1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Use params.slice in api/v2_alpha/notifications controller

This commit is contained in:
Matt Jankowski 2024-06-14 13:03:32 -04:00
parent 50bcdf5371
commit f9f558da7f

View file

@ -109,10 +109,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