summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-18 11:46:10 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-18 11:46:10 -0200
commit95a67cdbcfb52242a2736c79605e37a6d533640e (patch)
treede9ce40243fd12a47e82b3256a68d83d1fba15b1 /lib/api/projects.rb
parent4163eb56d91f75f62d562034140b0b4debecb315 (diff)
parent08ddb8f7689ec0d50e6c28e90f5eb7ab107fd0d3 (diff)
downloadgitlab-ce-95a67cdbcfb52242a2736c79605e37a6d533640e.tar.gz
Merge branch 'master' into branch-invalid-name
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: