Skip to content
Snippets Groups Projects
Unverified Commit d03a4c9a authored by Camil Staps's avatar Camil Staps
Browse files

Add users/:user_id/starred_projects API endpoint for projects starred by a user

parent b74c5dbc
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -115,6 +115,22 @@ module API
 
present_projects load_projects
end
desc 'Get a user\'s starred projects' do
success Entities::BasicProjectDetails
end
params do
requires :user_id, type: String, desc: 'The ID or username of the user'
use :collection_params
use :statistics_params
end
get ":user_id/starred_projects" do
user = find_user(params[:user_id])
not_found!('User') unless user
starred_projects = StarredProjectsFinder.new(user).execute(current_user)
present_projects starred_projects
end
end
 
resource :projects do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment