forked from mirror/openmw-tes3mp
[Master] Fix REST servers/info
This commit is contained in:
parent
bca594150c
commit
1f632d8bc9
1 changed files with 2 additions and 2 deletions
|
@ -164,11 +164,11 @@ void RestServer::start()
|
|||
httpServer.resource["/api/servers/info"]["GET"] = [this](auto response, auto /*request*/) {
|
||||
stringstream ss;
|
||||
ss << '{';
|
||||
ss << "servers: " << serverMap->size();
|
||||
ss << "\"servers\": " << serverMap->size();
|
||||
unsigned int players = 0;
|
||||
for (auto s : *serverMap)
|
||||
players += s.second.GetPlayers();
|
||||
ss << ", players: " << players;
|
||||
ss << ", \"players\": " << players;
|
||||
ss << "}";
|
||||
|
||||
ResponseStr(*response, ss.str(), "application/json");
|
||||
|
|
Loading…
Reference in a new issue