finished reset password & other changes

This commit is contained in:
2024-04-24 22:37:55 +03:00
parent b1ad7b5c3e
commit 53cadc289a
58 changed files with 1520 additions and 349 deletions

View File

@@ -0,0 +1,17 @@
import db from '@/lib/db'
export const getPasswordResetTokenByToken = async (token: string) => {
try {
return await db.passwordResetToken.findUnique({ where: { token } })
} catch {
return null
}
}
export const getPasswordResetTokenByEmail = async (email: string) => {
try {
return await db.passwordResetToken.findFirst({ where: { email } })
} catch {
return null
}
}