Skip to content

Commit

Permalink
refactor: 在线节点 API 整合
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Aug 29, 2024
1 parent f4fbe84 commit 3ec6f5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 3ec6f5b

Please sign in to comment.