优化组织和用户创建逻辑,简化插入数据结构并处理可选描述字段

This commit is contained in:
2026-02-07 02:04:17 +08:00
parent 7dfa96d165
commit 0bd634faf2
9 changed files with 302 additions and 947 deletions

View File

@@ -92,9 +92,7 @@ app
}
try {
const user = await User.findOne({
where: {
id: tokenUser.id,
},
id: tokenUser.id,
});
if (!user) {
ctx.throw(404, 'user not found');
@@ -133,9 +131,7 @@ app
try {
const user = await User.findOne({
where: {
id: tokenUser.id,
},
id: tokenUser.id,
});
if (!user) {
ctx.throw(404, 'user not found');