add api v1 procedure controller
This commit is contained in:
parent
e40e1299ad
commit
f474c8e8e1
7 changed files with 137 additions and 0 deletions
12
app/controllers/api/v1/procedures_controller.rb
Normal file
12
app/controllers/api/v1/procedures_controller.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
class API::V1::ProceduresController < APIController
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue