1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/controllers/open_api/v1/plans_controller.rb
Sylvain 657723bc22 (api) OpenAPI plans endpoints
index and show endpoints
2022-08-30 12:58:44 +02:00

22 lines
411 B
Ruby

# frozen_string_literal: true
# authorized 3rd party softwares can fetch data about plans through the OpenAPI
class OpenAPI::V1::PlansController < OpenAPI::V1::BaseController
extend OpenAPI::ApiDoc
expose_doc
before_action :set_plan, only: %i[show]
def index
@plans = Plan.order(:created_at)
end
def show; end
private
def set_plan
@plan = Plan.friendly.find(params[:id])
end
end