feat: 初始化项目用户初始化修改

This commit is contained in:
2024-10-09 11:46:36 +08:00
parent 8cdd54af04
commit 03c473d24a
3 changed files with 77 additions and 29 deletions

View File

@@ -12,7 +12,9 @@ app
.define(async (ctx) => {
const state = ctx.state?.tokenUser || {};
const { id } = state;
const user = await User.findByPk(id);
const user = await User.findByPk(id, {
logging: false,
});
if (!user) {
throw new CustomError(500, 'user not found');
}