接口提示信息国际化

This commit is contained in:
whyour
2026-06-11 02:19:04 +08:00
parent 946731ac8d
commit 05f8fd3805
17 changed files with 206 additions and 26 deletions
+18
View File
@@ -426,6 +426,24 @@ export default (app: Router) => {
},
);
route.put(
'/config/lang',
celebrate({
body: Joi.object({
lang: Joi.string().allow('').allow(null),
}),
}),
async (req: Request, res: Response, next: NextFunction) => {
try {
const systemService = Container.get(SystemService);
const result = await systemService.updateLanguage(req.body);
res.send(result);
} catch (e) {
return next(e);
}
},
);
route.put(
'/config/global-ssh-key',
celebrate({