mirror of
https://github.com/harivansh-afk/Saas-Teamspace.git
synced 2026-04-17 03:03:48 +00:00
initial commit
This commit is contained in:
commit
ef9ccf22d3
133 changed files with 20802 additions and 0 deletions
27
data/verification-token.ts
Normal file
27
data/verification-token.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { db } from '@/lib/db'
|
||||
|
||||
export const getVerificationTokenByToken = async (token: string) => {
|
||||
// Get Verification Token
|
||||
try {
|
||||
const verificationToken = await db.verificationToken.findUnique({
|
||||
where: { token }
|
||||
})
|
||||
|
||||
return verificationToken
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
export const getVerificationTokenByEmail = async (email: string) => {
|
||||
// Get Email Verification
|
||||
try {
|
||||
const verificationToken = await db.verificationToken.findFirst({
|
||||
where: { email }
|
||||
})
|
||||
|
||||
return verificationToken
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue