Skip to content

Commit

Permalink
fix: user sessions were not returned from database
Browse files Browse the repository at this point in the history
  • Loading branch information
romeq committed Jun 28, 2023
1 parent e723c76 commit 0620719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Routes {
return undefined
}

const user = await this.UserModel.findOne({ user: sessionMetadata.user }).exec()
const user = await this.UserModel.findOne({ name: sessionMetadata.user }).exec()
if (!user) return undefined

const sessionIndex = user.sessions.findIndex((s) => s.token == sessionMetadata.token)
Expand Down

0 comments on commit 0620719

Please sign in to comment.