diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-06 19:53:40 +0300 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-12 18:39:25 +0300 |
commit | 2179c4052e034e62867749043d53bae7eaf048d7 (patch) | |
tree | 9ea09ad1992b43900c1b83db12d387d23284c5c4 /lib/api/projects.rb | |
parent | ded67d3b68b438a71bb3771865981c3c7d0b3730 (diff) |
adds basic functionality to the new endpoint of the api
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 844547665ef..9448af92a98 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -32,6 +32,17 @@ module API end end + # Get a simplified project list for authenticated user + # + # Example Request: + # GET /projects/simple + get '/simple' do + @projects = current_user.authorized_projects + @projects = filter_projects(@projects) + @projects = paginate @projects + present @projects, with: Entities::SimpleProjectWithAccess, user: current_user + end + # Get an owned projects list for authenticated user # # Example Request: |