Skip to content

Commit

Permalink
final cleanup: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
Soxasora committed Jan 16, 2025
1 parent 6133e7a commit 93fd630
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions pages/api/auth/[...nextauth].js
Original file line number Diff line number Diff line change
Expand Up @@ -408,32 +408,6 @@ function randomizeToken () {
return bech32.encode('token', words).slice(6, 12)
}

export async function checkVerificationAttempt (email) {
const verificationRequest = await prisma.verificationRequest.findUnique({
where: { identifier: email }
})

if (verificationRequest) {
const newAttempts = verificationRequest.attempts + 1

if (newAttempts > 3) {
await prisma.verificationRequest.deleteMany({
where: {
identifier: email,
attempts: {
gt: 3
}
}
})
} else {
await prisma.verificationRequest.update({
where: { identifier: email },
data: { attempts: newAttempts }
})
}
}
}

async function sendVerificationRequest ({
identifier: email,
url,
Expand Down

0 comments on commit 93fd630

Please sign in to comment.