fix /users/me endpoint to use current_user
This commit is contained in:
parent
9c5c859da6
commit
32bc9f5872
1 changed files with 5 additions and 1 deletions
|
|
@ -227,7 +227,11 @@ module Api
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_by_id
|
def set_by_id
|
||||||
@user = User.find_by('id = ?', params[:id])
|
if params[:id] == 'me'
|
||||||
|
@user = current_user
|
||||||
|
else
|
||||||
|
@user = User.find_by('id = ?', params[:id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_params
|
def user_params
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue