lib/mkit/app/controllers/services_controller.rb in mkit-0.3.0 vs lib/mkit/app/controllers/services_controller.rb in mkit-0.4.0
- old
+ new
@@ -39,13 +39,10 @@
tempfile = params[:file][:tempfile]
yaml = YAML.load(tempfile.read)
srv.update!(yaml.to_o)
end
format_response(srv)
- rescue MKIt::BaseException => e
- MKItLogger.debug e
- error e.error_code, e.message
end
# curl -X DELETE localhost:4567/services/1
delete '/services/:id' do
srv = find_by_id_or_name
@@ -60,13 +57,10 @@
tempfile = params[:file][:tempfile]
yaml = YAML.load(tempfile.read)
srv = Service.create(yaml.to_o)
end
format_response(srv)
- rescue MKIt::BaseException => e
- MKItLogger.debug e
- error e.error_code, e.message
end
#
# operations
#
@@ -82,6 +76,5 @@
srv = find_by_id_or_name
MkitJob.publish(topic: :stop_service, service_id: srv.id)
format_response(srv)
end
end
-