mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-10 21:24:20 +01:00
4c3aa59bc0
index spaces and show a space
22 lines
419 B
Ruby
22 lines
419 B
Ruby
# frozen_string_literal: true
|
|
|
|
# authorized 3rd party softwares can fetch data about spaces through the OpenAPI
|
|
class OpenAPI::V1::SpacesController < OpenAPI::V1::BaseController
|
|
extend OpenAPI::ApiDoc
|
|
expose_doc
|
|
|
|
before_action :set_space, only: %i[show]
|
|
|
|
def index
|
|
@spaces = Space.order(:created_at)
|
|
end
|
|
|
|
def show; end
|
|
|
|
private
|
|
|
|
def set_space
|
|
@space = Space.friendly.find(params[:id])
|
|
end
|
|
end
|