summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-09-21 15:10:33 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-09-26 19:14:19 +0100
commitd70b7a490dae32435c5c906bc6f923676c52a9ea (patch)
tree47e317492536a2da0edccdf5fa12a55407a7115f /lib/api/users.rb
parent4d88f6496836c7fbf8a0f58e4d2604bf2c3f96d5 (diff)
downloadgitlab-ce-d70b7a490dae32435c5c906bc6f923676c52a9ea.tar.gz
find_user users helper method no longer overrides find_user API helper method.37467-helper-method-from-users-endpoint-overrides-api-helper-method
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index bdebda58d3f..77ac24ec68d 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -11,7 +11,7 @@ module API
end
helpers do
- def find_user(params)
+ def find_user_by_id(params)
id = params[:user_id] || params[:id]
User.find_by(id: id) || not_found!('User')
end
@@ -430,7 +430,7 @@ module API
resource :impersonation_tokens do
helpers do
def finder(options = {})
- user = find_user(params)
+ user = find_user_by_id(params)
PersonalAccessTokensFinder.new({ user: user, impersonation: true }.merge(options))
end