Skip to content

Commit

Permalink
fix: 没有使用 await 导致增量更新文件出现错误
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Aug 29, 2024
1 parent f3eb161 commit abd4b36
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 @@ -325,7 +325,7 @@ export class Server {
res.status(404).send(); // 未找到
}
});
this.app.get('/openbmclapi/files', (req: Request, res: Response) => {
this.app.get('/openbmclapi/files', async (req: Request, res: Response) => {
if (!Utilities.verifyClusterRequest(req)) {
res.status(403).send(); // 禁止访问
return;
Expand All @@ -344,7 +344,7 @@ export class Server {
res.status(204).send();
return;
}
res.send(Utilities.getAvroBytes(files));
res.send(await Utilities.getAvroBytes(files));
}
});
this.app.get('/openbmclapi/configuration', (req: Request, res: Response) => {
Expand Down

0 comments on commit abd4b36

Please sign in to comment.