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:36:42 +0100
commita8cf4e13b33da8d71e16874ebf3dce9ca9d40b76 (patch)
tree57de33f76ac9f64cdf7d6acc2d3f9fcc07dcb6ea /lib/api/projects.rb
parente1c5eb480e10329245760edd0760a5b3cb929240 (diff)
downloadgitlab-ce-a8cf4e13b33da8d71e16874ebf3dce9ca9d40b76.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.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: