From 3ec6f5b3ea120e08e4fb61b7a1f0a290b7fb7ffa Mon Sep 17 00:00:00 2001 From: SALTWOOD <105980161+SALTWOOD@users.noreply.github.com> Date: Thu, 29 Aug 2024 16:37:46 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=9C=A8=E7=BA=BF=E8=8A=82?= =?UTF-8?q?=E7=82=B9=20API=20=E6=95=B4=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server.ts b/src/server.ts index 6ec9ed4..d6bf51e 100644 --- a/src/server.ts +++ b/src/server.ts @@ -416,7 +416,8 @@ export class Server { d.filter(b => b !== null).forEach(b => bytes += b.bytes); return bytes; }), - today: this.centerStats.today() + today: this.centerStats.today(), + onlines: this.clusters.filter(c => c.isOnline).length, }); }); this.app.get('/93AtHome/clusterStatistics', (req: Request, res: Response) => { @@ -694,7 +695,6 @@ export class Server { res.setHeader('Content-Type', 'application/json'); res.status(200).json(removeSensitiveInfo(cluster)); }); - this.app.get('/93AtHome/onlines', (req: Request, res: Response) => res.status(200).send(this.clusters.filter(c => c.isOnline).length)); } public setupSocketIO(): void {