summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index bdf4b77596e..5e75cd35c56 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -39,6 +39,17 @@ module API
present @projects, with: Entities::Project
end
+ # Gets starred project for the authenticated user
+ #
+ # Example Request:
+ # GET /projects/starred
+ get '/starred' do
+ @projects = current_user.starred_projects
+ @projects = filter_projects(@projects)
+ @projects = paginate @projects
+ present @projects, with: Entities::Project
+ end
+
# Get all projects for admin user
#
# Example Request: