Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alihadimazeh committed Jun 10, 2024
1 parent 1e62f15 commit 3b30762
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/controllers/api/v1/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,11 @@ def create_user_params
end

def update_user_params
external_auth? ? @update_user_params ||= params.require(:user).permit(:password, :avatar, :language, :role_id, :invite_token)
: params.require(:user).permit(:name, :password, :avatar, :language, :role_id, :invite_token)
@update_user_params ||= if external_auth?
params.require(:user).permit(:password, :avatar, :language, :role_id, :invite_token)
else
params.require(:user).permit(:name, :password, :avatar, :language, :role_id, :invite_token)
end
end

def change_password_params
Expand Down

0 comments on commit 3b30762

Please sign in to comment.