Commit a09fc160d02f232e9819c7459a9ff91a4e990bf3

Authored by Dmitriy Zaporozhets
1 parent f614fa97

Add project.all for API if admin

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 10 additions and 0 deletions   Show diff stats
lib/api/projects.rb
... ... @@ -31,6 +31,16 @@ module API
31 31 present @projects, with: Entities::Project
32 32 end
33 33  
  34 + # Get all projects for admin user
  35 + #
  36 + # Example Request:
  37 + # GET /projects/all
  38 + get '/all' do
  39 + authenticated_as_admin!
  40 + @projects = paginate Project
  41 + present @projects, with: Entities::Project
  42 + end
  43 +
34 44 # Get a single project
35 45 #
36 46 # Parameters:
... ...