Fixing debug controller in back
This commit is contained in:
parent
7326e2a38c
commit
bf830a67cb
@ -11,7 +11,7 @@ export class DebugController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getDump() {
|
getDump() {
|
||||||
this.App.get("/dump", (res: HttpResponse, req: HttpRequest) => {
|
this.App.get("/dump", async (res: HttpResponse, req: HttpRequest) => {
|
||||||
const query = parse(req.getQuery());
|
const query = parse(req.getQuery());
|
||||||
|
|
||||||
if (query.token !== ADMIN_API_TOKEN) {
|
if (query.token !== ADMIN_API_TOKEN) {
|
||||||
@ -22,7 +22,7 @@ export class DebugController {
|
|||||||
.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(await Promise.all(socketManager.getWorlds().values()), (key: unknown, value: unknown) => {
|
||||||
if (key === "listeners") {
|
if (key === "listeners") {
|
||||||
return "Listeners";
|
return "Listeners";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user