Commit 74467e9e authored by Cool Fire's avatar Cool Fire

Always return json

parent e2d71fe3
Pipeline #1768 failed with stages
in 2 minutes and 29 seconds
......@@ -10,8 +10,12 @@ class HashDbApi < Sinatra::Base
enable :lock
set :database_prefix, '/databases/'
before do
content_type :json
end
get '/' do
'Nothing here but us chickens'
'Nobody here but us chickens'.to_json
end
end
......
......@@ -24,7 +24,6 @@ class HashDbApi < Sinatra::Base
hashes['password'] = params['password']
# Show results
content_type :json
hashes.to_json
end
......@@ -47,7 +46,6 @@ class HashDbApi < Sinatra::Base
db.close
# Format and return result
content_type :json
{
'hash': params['hash'],
'found': !result.nil?,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment