diff options
author | Carl Schwan <carl@carlschwan.eu> | 2023-01-13 16:40:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 16:40:21 +0100 |
commit | f33e22ae4c32d6a01b2e706bb0b55f961689f03f (patch) | |
tree | 76f164a2b582546026da235d958f91835bb8a92b /app | |
parent | ff70e5019910c309f8ab38d729c4eb5819512698 (diff) |
Allow changing hide_collections setting with the api (#22790)
* Allow changing hide_collections setting with the api This is currently only possible with app/controllers/settings/profiles_controller.rb and is the only difference in the allowed parameter between the two controllers * Fix the lint issue * Use normal indent
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/api/v1/accounts/credentials_controller.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts/credentials_controller.rb b/app/controllers/api/v1/accounts/credentials_controller.rb index 64b5cb747..94b707771 100644 --- a/app/controllers/api/v1/accounts/credentials_controller.rb +++ b/app/controllers/api/v1/accounts/credentials_controller.rb @@ -21,7 +21,17 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController private def account_params - params.permit(:display_name, :note, :avatar, :header, :locked, :bot, :discoverable, fields_attributes: [:name, :value]) + params.permit( + :display_name, + :note, + :avatar, + :header, + :locked, + :bot, + :discoverable, + :hide_collections, + fields_attributes: [:name, :value] + ) end def user_settings_params |