Added some more server info to the server status API
This commit is contained in:
parent
efde09025c
commit
4007b99833
@ -76,7 +76,9 @@ $app->get('/server/{serverName}/status', function (Request $request, Response $r
|
|||||||
// create server object and pass info back to client as JSON data
|
// create server object and pass info back to client as JSON data
|
||||||
$server = new Server($serverDir);
|
$server = new Server($serverDir);
|
||||||
$serverData = [
|
$serverData = [
|
||||||
'state' => $server->getState() ? 'Running' : 'Stopped',
|
'name' => $server->getName(),
|
||||||
|
'version' => $server->getVersion(),
|
||||||
|
'state' => $server->getState() ? 'Running' : 'Stopped',
|
||||||
];
|
];
|
||||||
|
|
||||||
$response->getBody()->write(json_encode($serverData));
|
$response->getBody()->write(json_encode($serverData));
|
||||||
|
Loading…
Reference in New Issue
Block a user