From bf830a67cb33d4eb3eb6d8a91fa77011429716c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 3 Dec 2021 09:23:31 +0100 Subject: [PATCH] Fixing debug controller in back --- back/src/Controller/DebugController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/back/src/Controller/DebugController.ts b/back/src/Controller/DebugController.ts index 88287753..5210667b 100644 --- a/back/src/Controller/DebugController.ts +++ b/back/src/Controller/DebugController.ts @@ -11,7 +11,7 @@ export class DebugController { } getDump() { - this.App.get("/dump", (res: HttpResponse, req: HttpRequest) => { + this.App.get("/dump", async (res: HttpResponse, req: HttpRequest) => { const query = parse(req.getQuery()); if (query.token !== ADMIN_API_TOKEN) { @@ -22,7 +22,7 @@ export class DebugController { .writeStatus("200 OK") .writeHeader("Content-Type", "application/json") .end( - stringify(socketManager.getWorlds(), (key: unknown, value: unknown) => { + stringify(await Promise.all(socketManager.getWorlds().values()), (key: unknown, value: unknown) => { if (key === "listeners") { return "Listeners"; }