Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-07-06 19:53:40 +0300
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-07-12 18:39:25 +0300
commit2179c4052e034e62867749043d53bae7eaf048d7 (patch)
tree9ea09ad1992b43900c1b83db12d387d23284c5c4 /lib/api/projects.rb
parentded67d3b68b438a71bb3771865981c3c7d0b3730 (diff)
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: