Skip to content

Commit b33aa17

Browse files
committed
fix: 管理员初始化注册时数据库状态为 null
1 parent 12a3d96 commit b33aa17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/src/storage/mongo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ export async function createUser(email: string, password: string, roles?: UserRo
435435
if (roles && roles.includes(UserRole.Admin))
436436
userInfo.status = Status.Normal
437437
// Using `if (status !== null)` check because status.Normal value is 0, so `if (status)` would fail when status is Normal
438-
if (status !== null)
438+
if (status != null)
439439
userInfo.status = status
440440

441441
userInfo.roles = roles

0 commit comments

Comments
 (0)