Add: #778 アカウント名・紹介文のフィルタリング (#779)

* Add: #778 アカウント名・紹介文のフィルタリング

* Fix test
This commit is contained in:
KMY(雪あすか) 2024-07-10 20:15:12 +09:00 committed by GitHub
parent d413e2d6e5
commit 8e59cd0992
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 39 additions and 9 deletions

View file

@ -52,11 +52,11 @@ class Api::V1::FiltersController < Api::BaseController
end
def resource_params
params.permit(:phrase, :expires_in, :irreversible, :exclude_follows, :exclude_localusers, :with_quote, :whole_word, context: [])
params.permit(:phrase, :expires_in, :irreversible, :exclude_follows, :exclude_localusers, :with_quote, :with_profile, :whole_word, context: [])
end
def filter_params
resource_params.slice(:phrase, :expires_in, :irreversible, :exclude_follows, :exclude_localusers, :with_quote, :context)
resource_params.slice(:phrase, :expires_in, :irreversible, :exclude_follows, :exclude_localusers, :with_quote, :with_profile, :context)
end
def keyword_params

View file

@ -43,6 +43,6 @@ class Api::V2::FiltersController < Api::BaseController
end
def resource_params
params.permit(:title, :expires_in, :filter_action, :exclude_follows, :exclude_localusers, :with_quote, context: [], keywords_attributes: [:id, :keyword, :whole_word, :_destroy])
params.permit(:title, :expires_in, :filter_action, :exclude_follows, :exclude_localusers, :with_quote, :with_profile, context: [], keywords_attributes: [:id, :keyword, :whole_word, :_destroy])
end
end