From 5ed275662838a1fc4f306ed2922add1f995e2ed2 Mon Sep 17 00:00:00 2001 From: Scott Schneider Date: Fri, 29 Aug 2014 11:38:06 -0700 Subject: [PATCH] Return a 'domain' JSON key if configured --- lib/vmpooler/api.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/vmpooler/api.rb b/lib/vmpooler/api.rb index dd1cfb7..3a38fd8 100644 --- a/lib/vmpooler/api.rb +++ b/lib/vmpooler/api.rb @@ -221,6 +221,10 @@ module Vmpooler result['ok'] = false end + if ( result['ok'] and $config[:config]['domain'] ) + result['domain'] = $config[:config]['domain'] + end + JSON.pretty_generate(result) end @@ -285,6 +289,10 @@ module Vmpooler result['ok'] = false end + if ( result['ok'] and $config[:config]['domain'] ) + result['domain'] = $config[:config]['domain'] + end + JSON.pretty_generate(result) end