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:36:42 +0300
commita8cf4e13b33da8d71e16874ebf3dce9ca9d40b76 (patch)
tree57de33f76ac9f64cdf7d6acc2d3f9fcc07dcb6ea /lib/api/projects.rb
parente1c5eb480e10329245760edd0760a5b3cb929240 (diff)
adds basic functionality to the new endpoint of the api
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index deade7cad90..c1e66b239aa 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -25,11 +25,20 @@ module API
@projects = current_user.authorized_projects
@projects = filter_projects(@projects)
@projects = paginate @projects
- @projects = filter_params(@projects)
- puts present @projects, with: Entities::ProjectWithAccess, user: current_user
present @projects, with: Entities::ProjectWithAccess, user: current_user
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: