diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2019-01-31 11:13:23 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2019-01-31 11:13:23 +0100 |
commit | a612bd070862097893103c4babc63df9ad45b214 (patch) | |
tree | a16a646706d9a729badd836da0824eb0ba5121b5 /lib/api/users.rb | |
parent | 33200ed6904b00fc6c24363e29f4a8de895fb6c1 (diff) | |
download | gitlab-ce-a612bd070862097893103c4babc63df9ad45b214.tar.gz |
Unify user requirements for API slugs
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index ff33e892ef8..8ce09a8881b 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -133,10 +133,10 @@ module API desc "Get the status of a user" params do - requires :id_or_username, type: String, desc: 'The ID or username of the user' + requires :user_id, type: String, desc: 'The ID or username of the user' end - get ":id_or_username/status", requirements: { id_or_username: API::NO_SLASH_URL_PART_REGEX } do - user = find_user(params[:id_or_username]) + get ":user_id/status", requirements: API::USER_REQUIREMENTS do + user = find_user(params[:user_id]) not_found!('User') unless user && can?(current_user, :read_user, user) present user.status || {}, with: Entities::UserStatus |