summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-01-28 20:01:18 +0100
committerCamil Staps <info@camilstaps.nl>2019-08-07 20:49:15 +0200
commite7c34c37c83d877a887173d833ba4103772d1566 (patch)
treeedddbe432c6f7a06f787b54347ac54207fe52e34 /lib/api
parentb7b57b83cc294727736c2276bd72a7e47c313e68 (diff)
downloadgitlab-ce-e7c34c37c83d877a887173d833ba4103772d1566.tar.gz
Add documentation and changelog for !24690
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/projects.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index e24c5765de5..dc9959b619f 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -116,7 +116,7 @@ module API
present_projects load_projects
end
- desc 'Get a user\'s starred projects' do
+ desc 'Get projects starred by a user' do
success Entities::BasicProjectDetails
end
params do
@@ -374,16 +374,18 @@ module API
end
end
- desc 'List users who starred this project' do
+ desc 'Get the users who starred a project' do
success Entities::UserBasic
end
params do
- use :collection_params
+ optional :search, type: String, desc: 'Return list of users matching the search criteria'
+ use :pagination
end
get ':id/starrers' do
users = DeclarativePolicy.subject_scope { user_project.starrers }
+ users = users.search(params[:search]) if params[:search].present?
- present users, with: Entities::UserBasic
+ present paginate(users), with: Entities::UserBasic
end
desc 'Get languages in project repository'