mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-17 12:33:22 +00:00
fix verification endpoint
This commit is contained in:
@@ -26,7 +26,7 @@ export class VerifyEmailHandler implements ICommandHandler<VerifyEmailCommand> {
|
||||
const isTokenExpired = isBefore(verificationWithUser.verificationTokenExpiry, new Date())
|
||||
|
||||
if (dbToken !== token || isTokenExpired) {
|
||||
return false
|
||||
throw new BadRequestException('Incorrect or expired token')
|
||||
}
|
||||
|
||||
const result = await this.usersRepository.updateEmailVerification(verificationWithUser.userId)
|
||||
|
||||
Reference in New Issue
Block a user