Set Sinatra not_found to JSON ok: false

This commit is contained in:
Scott Schneider 2015-02-25 15:02:29 -08:00
parent f80dad32c2
commit e121adb76b

View file

@ -42,6 +42,16 @@ module Vmpooler
end end
end end
not_found do
content_type :json
result = {
ok: false
}
JSON.pretty_generate(result)
end
get '/' do get '/' do
erb :dashboard, locals: { erb :dashboard, locals: {
site_name: $config[:config]['site_name'] || '<b>vmpooler</b>' site_name: $config[:config]['site_name'] || '<b>vmpooler</b>'