summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-07-06 17:53:40 +0100
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-07-12 16:39:25 +0100
commit2179c4052e034e62867749043d53bae7eaf048d7 (patch)
tree9ea09ad1992b43900c1b83db12d387d23284c5c4 /lib/api/projects.rb
parentded67d3b68b438a71bb3771865981c3c7d0b3730 (diff)
downloadgitlab-ce-2179c4052e034e62867749043d53bae7eaf048d7.tar.gz
adds basic functionality to the new endpoint of the api
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 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: