Improved server creation and options

This commit is contained in:
Dane Everitt 2016-01-01 22:53:43 -05:00
parent 8b8ef4f2d6
commit 6b25a163fc
6 changed files with 168 additions and 14 deletions

View file

@ -142,7 +142,12 @@ class ServersController extends Controller
], 500);
}
return response()->json(Models\ServiceOptions::select('id', 'name', 'docker_image')->where('parent_service', $request->input('service'))->orderBy('name', 'asc')->get());
$service = Models\Service::select('executable', 'startup')->where('id', $request->input('service'))->first();
return response()->json([
'exec' => $service->executable,
'startup' => $service->startup,
'options' => Models\ServiceOptions::select('id', 'name', 'docker_image')->where('parent_service', $request->input('service'))->orderBy('name', 'asc')->get()
]);
}