Merge branch 'develop' of github.com:thecodingmachine/workadventure

This commit is contained in:
_Bastler 2022-01-10 15:42:59 +01:00
commit 7a12e48e70

View File

@ -19,11 +19,13 @@ export class DebugController {
return res.writeStatus("401 Unauthorized").end("Invalid token sent!"); return res.writeStatus("401 Unauthorized").end("Invalid token sent!");
} }
const worlds = Object.fromEntries(socketManager.getWorlds().entries());
return res return res
.writeStatus("200 OK") .writeStatus("200 OK")
.writeHeader("Content-Type", "application/json") .writeHeader("Content-Type", "application/json")
.end( .end(
stringify(socketManager.getWorlds(), (key: unknown, value: unknown) => { stringify(worlds, (key: unknown, value: unknown) => {
if (value instanceof Map) { if (value instanceof Map) {
const obj: any = {}; // eslint-disable-line @typescript-eslint/no-explicit-any const obj: any = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
for (const [mapKey, mapValue] of value.entries()) { for (const [mapKey, mapValue] of value.entries()) {