1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/controllers/api/openlab_projects_controller.rb
Sylvain 0cd841da33 rubocop api controllers
TODO:
 - events controller
 - availabilies controller
 - members controller
 - plans controller
2019-01-16 16:28:25 +01:00

14 lines
457 B
Ruby

# frozen_string_literal: true
# API Controller for resources of type Openlab::Projects
# Openlab::Projects are Projects shared between different instances
class API::OpenlabProjectsController < API::ApiController
PROJECTS = Openlab::Projects.new
def index
render json: PROJECTS.search(params[:q], page: params[:page], per_page: params[:per_page]).response.body
rescue StandardError
render json: { errors: ['service unavailable'] }
end
end