Skip to content

Commit

Permalink
Bootcamp ログイン情報取得を取得する処理追加
Browse files Browse the repository at this point in the history
  • Loading branch information
MikotoMakizuru committed Dec 15, 2024
1 parent ea57ced commit 166c119
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/api/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ def target_users
end

def set_user
@user = User.find(params[:id])
@user = if params[:id] == 'show'
User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
else
User.find(params[:id])
end
end

def user_params
Expand Down

0 comments on commit 166c119

Please sign in to comment.