增加数据备份功能

This commit is contained in:
whyour
2023-07-16 00:23:29 +08:00
parent 8affff96f3
commit 88b87de391
7 changed files with 110 additions and 13 deletions
+12
View File
@@ -209,4 +209,16 @@ export default (app: Router) => {
}
},
);
route.put(
'/data/export',
async (req: Request, res: Response, next: NextFunction) => {
try {
const systemService = Container.get(SystemService);
await systemService.exportData(res);
} catch (e) {
return next(e);
}
},
);
};