Use boolean instead of string for 'ok' response

This commit is contained in:
Scott Schneider 2013-11-04 10:53:59 -08:00
parent e051e625c8
commit 6c74a89e11

View file

@ -67,10 +67,10 @@ post '/vm/:template' do
logger.log('s', "[<] '#{vm}' moved to 'running' queue") logger.log('s', "[<] '#{vm}' moved to 'running' queue")
result[params[:template]]['ok'] = 'true' result[params[:template]]['ok'] = true
result[params[:template]]['hostname'] = vm result[params[:template]]['hostname'] = vm
else else
result[params[:template]]['ok'] = 'false' result[params[:template]]['ok'] = false
end end
end end
@ -89,7 +89,7 @@ delete '/vm/:hostname' do
end end
end end
result['ok'] = 'true' result['ok'] = true
JSON.pretty_generate(result) JSON.pretty_generate(result)
end end