This commit is contained in:
David Négrier 2021-12-06 18:34:09 +01:00
parent 84f7a8c383
commit b9840cfa3d

View File

@ -23,7 +23,9 @@ export class DebugController {
.writeStatus("200 OK")
.writeHeader("Content-Type", "application/json")
.end(
stringify(await Promise.all(socketManager.getWorlds().values()), (key: unknown, value: unknown) => {
stringify(
await Promise.all(socketManager.getWorlds().values()),
(key: unknown, value: unknown) => {
if (key === "listeners") {
return "Listeners";
}
@ -48,10 +50,10 @@ export class DebugController {
} else {
return value;
}
})
}
)
);
})().catch(e => {
})().catch((e) => {
console.error(e);
res.writeStatus("500");
res.end("An error occurred");