From 25b84674af1e45e92b28088fa156e665c0a8a067 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 14 Jun 2024 13:03:32 -0400 Subject: [PATCH] Use `params.slice` in api/v2_alpha/notifications controller --- app/controllers/api/v2_alpha/notifications_controller.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v2_alpha/notifications_controller.rb b/app/controllers/api/v2_alpha/notifications_controller.rb index 19d3ac9018..5cd405a049 100644 --- a/app/controllers/api/v2_alpha/notifications_controller.rb +++ b/app/controllers/api/v2_alpha/notifications_controller.rb @@ -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