From f9f558da7fc168d135b60bcfd010bcf35a53f97e 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 83d40a0886f..ba7c05344d1 100644 --- a/app/controllers/api/v2_alpha/notifications_controller.rb +++ b/app/controllers/api/v2_alpha/notifications_controller.rb @@ -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