Merge pull request #57 from sschneid/not_found_ok_false

Set Sinatra not_found to JSON ok: false
This commit is contained in:
Colin 2015-02-25 15:20:28 -08:00
commit b044ea6c8e

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>'