Skip to content

Commit

Permalink
fix: admin role error (Close #158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin committed May 23, 2023
1 parent 9bee766 commit ebd5df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ router.post('/user-login', async (req, res) => {
avatar: user.avatar,
description: user.description,
userId: user._id,
root: !user.roles.includes(UserRole.Admin),
root: user.roles.includes(UserRole.Admin),
config: user.config,
}, config.siteConfig.loginSalt.trim())
res.send({ status: 'Success', message: '登录成功 | Login successfully', data: { token } })
Expand Down

0 comments on commit ebd5df8

Please sign in to comment.