修改系统内更新系统逻辑

This commit is contained in:
whyour
2023-07-13 22:09:45 +08:00
parent 936b565fb1
commit 8affff96f3
6 changed files with 125 additions and 31 deletions
+14
View File
@@ -116,6 +116,20 @@ export default (app: Router) => {
},
);
route.put(
'/reload',
async (req: Request, res: Response, next: NextFunction) => {
const logger: Logger = Container.get('logger');
try {
const systemService = Container.get(SystemService);
const result = await systemService.reloadSystem();
res.send(result);
} catch (e) {
return next(e);
}
},
);
route.put(
'/notify',
celebrate({