Add projects/:id/starrers API endpoint for users who starred a repository
This commit is contained in:
parent
ab498bd4f9
commit
5b20df0a92
1 changed files with 12 additions and 0 deletions
|
@ -358,6 +358,18 @@ module API
|
|||
end
|
||||
end
|
||||
|
||||
desc 'List users who starred this project' do
|
||||
success Entities::UserBasic
|
||||
end
|
||||
params do
|
||||
use :collection_params
|
||||
end
|
||||
get ':id/starrers' do
|
||||
users = DeclarativePolicy.subject_scope { user_project.starrers }
|
||||
|
||||
present users, with: Entities::UserBasic
|
||||
end
|
||||
|
||||
desc 'Get languages in project repository'
|
||||
get ':id/languages' do
|
||||
::Projects::RepositoryLanguagesService
|
||||
|
|
Loading…
Reference in a new issue