diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-12-07 00:10:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 00:10:53 +0100 |
commit | 69137f4a90874442cc5fefdf86dad7c4a4884bdc (patch) | |
tree | 3c02e14ef8744b5db3f52a23a2196fd28a1cf165 /app/controllers/api | |
parent | f80c3d40e81b0955e4d5d1df76a2eb9efe1e711a (diff) |
Fix irreversible and whole_word parameters handling in /api/v1/filters (#21988)
Fixes #21965
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/filters_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/api/v1/filters_controller.rb b/app/controllers/api/v1/filters_controller.rb index 149139b40..772791b25 100644 --- a/app/controllers/api/v1/filters_controller.rb +++ b/app/controllers/api/v1/filters_controller.rb @@ -13,7 +13,7 @@ class Api::V1::FiltersController < Api::BaseController def create ApplicationRecord.transaction do - filter_category = current_account.custom_filters.create!(resource_params) + filter_category = current_account.custom_filters.create!(filter_params) @filter = filter_category.keywords.create!(keyword_params) end @@ -52,11 +52,11 @@ class Api::V1::FiltersController < Api::BaseController end def resource_params - params.permit(:phrase, :expires_in, :irreversible, context: []) + params.permit(:phrase, :expires_in, :irreversible, :whole_word, context: []) end def filter_params - resource_params.slice(:expires_in, :irreversible, :context) + resource_params.slice(:phrase, :expires_in, :irreversible, :context) end def keyword_params |