diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-12-16 23:39:27 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-12-16 23:46:00 +0300 |
commit | c36821df9f571855b477b09c102b90a78b9079e9 (patch) | |
tree | b875e23256410e33d60a42f306f8964661400860 /lib/api/projects.rb | |
parent | a9f7df56ba53e1bf51355c08a70b4e82bc4d7f7d (diff) |
Api support for requesting starred projects for user
Fixes #4112
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 11 |
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: |