Skip to content

Commit

Permalink
fix:(login) Admin should be able to login after signup #579
Browse files Browse the repository at this point in the history
  • Loading branch information
mpanoathos committed Oct 16, 2024
1 parent c99966a commit c0223e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resolvers/userResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ const resolvers: any = {
admin: user.id,
})

if (user?.role === RoleOfUser.ADMIN && organization) {
if (user?.role === RoleOfUser.ADMIN ) {
const token = generateToken(user._id, user._doc?.role || 'user')
const data = {
token: token,
Expand Down Expand Up @@ -1200,4 +1200,4 @@ const resolvers: any = {
},
},
}
export default resolvers
export default resolvers

0 comments on commit c0223e2

Please sign in to comment.