2a6da54320
Error : stack level too deep
24 lines
593 B
Ruby
24 lines
593 B
Ruby
class API::V1::ProceduresController < APIController
|
|
api :GET, '/procedures/:id', 'Informations concernant une procédure'
|
|
param :id, Integer, desc: "L'identifiant de la procédure", required: true
|
|
error code: 401, desc: "Non authorisé"
|
|
error code: 404, desc: "Procédure inconnue"
|
|
|
|
description <<-EOS
|
|
Plop
|
|
EOS
|
|
|
|
meta champs: {
|
|
|
|
}
|
|
|
|
def show
|
|
@procedure = current_administrateur.procedures.find(params[:id]).decorate
|
|
|
|
render json: @procedure
|
|
rescue ActiveRecord::RecordNotFound => e
|
|
Rails.logger.error(e.message)
|
|
render json: {}, status: 404
|
|
end
|
|
|
|
end
|