Skip to content

Commit

Permalink
Fix avatar deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD committed Dec 6, 2024
1 parent 90f4b88 commit 6df5fdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/api/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ def show
end

def update
User::UpdateAvatar.(current_user, params.require(:user)[:avatar]) if params.dig(:user, :avatar).present?
if params.dig(:user, :avatar).present? # rubocop:disable Style/IfUnlessModifier:
User::UpdateAvatar.(current_user, params.require(:user)[:avatar])
end

if params.dig(:user, :seniority).present?
current_user.update(
Expand Down

0 comments on commit 6df5fdb

Please sign in to comment.