added 2FA
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
'use server'
|
||||
|
||||
import db from '@/lib/db'
|
||||
import journal from '@/actions/logger'
|
||||
|
||||
export const getPasswordResetTokenByToken = async (token: string) => {
|
||||
try {
|
||||
return await db.passwordResetToken.findUnique({ where: { token } })
|
||||
} catch {
|
||||
} catch (err) {
|
||||
journal.error({ getPasswordResetTokenByToken: err, token })
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -11,7 +15,8 @@ export const getPasswordResetTokenByToken = async (token: string) => {
|
||||
export const getPasswordResetTokenByEmail = async (email: string) => {
|
||||
try {
|
||||
return await db.passwordResetToken.findFirst({ where: { email } })
|
||||
} catch {
|
||||
} catch (err) {
|
||||
journal.error({ getPasswordResetTokenByEmail: err, email })
|
||||
return null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user