mirror of https://github.com/mastodon/mastodon.git
Use `params.slice` in api/v2_alpha/notifications controller
parent
b27f945e40
commit
25b84674af
|
@ -82,10 +82,15 @@ class Api::V2Alpha::NotificationsController < Api::BaseController
|
|||
end
|
||||
|
||||
def browserable_params
|
||||
params.permit(:include_filtered, types: [], exclude_types: [])
|
||||
params
|
||||
.slice(:include_filtered, :types, :exclude_types)
|
||||
.permit(:include_filtered, types: [], exclude_types: [])
|
||||
end
|
||||
|
||||
def pagination_params(core_params)
|
||||
params.slice(:limit, :types, :exclude_types, :include_filtered).permit(:limit, :include_filtered, types: [], exclude_types: []).merge(core_params)
|
||||
params
|
||||
.slice(:limit, :types, :exclude_types, :include_filtered)
|
||||
.permit(:limit, :include_filtered, types: [], exclude_types: [])
|
||||
.merge(core_params)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue