Added some more server info to the server status API

This commit is contained in:
Gregory Ballantine 2022-09-24 22:10:23 -04:00
parent efde09025c
commit 4007b99833

View File

@ -76,6 +76,8 @@ $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 = [
'name' => $server->getName(),
'version' => $server->getVersion(),
'state' => $server->getState() ? 'Running' : 'Stopped', 'state' => $server->getState() ? 'Running' : 'Stopped',
]; ];