summaryrefslogtreecommitdiff
path: root/lib/api/api.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index d26667ba3f7..60858a39407 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -2,10 +2,11 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module API
class API < Grape::API
+ include APIGuard
version 'v3', using: :path
rescue_from ActiveRecord::RecordNotFound do
- rack_response({'message' => '404 Not found'}.to_json, 404)
+ rack_response({ 'message' => '404 Not found' }.to_json, 404)
end
rescue_from :all do |exception|
@@ -18,7 +19,7 @@ module API
message << " " << trace.join("\n ")
API.logger.add Logger::FATAL, message
- rack_response({'message' => '500 Internal Server Error'}, 500)
+ rack_response({ 'message' => '500 Internal Server Error' }, 500)
end
format :json