Skip to content

Commit e63f8d2

Browse files
authored
fix: admin user init (#476)
Signed-off-by: Bob Du <[email protected]>
1 parent 3195778 commit e63f8d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service/src/storage/mongo.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export async function updateChat(chatId: string, response: string, messageId: st
9696
}
9797

9898
if (previousResponse)
99-
// @ts-expect-error previousResponse
99+
// @ts-expect-error https://jira.mongodb.org/browse/NODE-5214
100100
update.$set.previousResponse = previousResponse
101101

102102
await chatCol.updateOne(query, update)
@@ -253,7 +253,7 @@ export async function createUser(email: string, password: string, roles?: UserRo
253253
const userInfo = new UserInfo(email, password)
254254
if (roles && roles.includes(UserRole.Admin))
255255
userInfo.status = Status.Normal
256-
if (status !== null)
256+
if (status)
257257
userInfo.status = status
258258

259259
userInfo.roles = roles

0 commit comments

Comments
 (0)