系统设置增加时区设置

This commit is contained in:
whyour
2025-02-27 00:45:21 +08:00
parent 64fcbff715
commit af3e358a6a
10 changed files with 556 additions and 5 deletions
+18
View File
@@ -396,4 +396,22 @@ export default (app: Router) => {
}
},
);
route.put(
'/config/timezone',
celebrate({
body: Joi.object({
timezone: Joi.string().allow('').allow(null),
}),
}),
async (req: Request, res: Response, next: NextFunction) => {
try {
const systemService = Container.get(SystemService);
const result = await systemService.updateTimezone(req.body);
res.send(result);
} catch (e) {
return next(e);
}
},
);
};