mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
18 lines
373 B
TypeScript
18 lines
373 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
export interface GetUserByVerificationTokenOptions {
|
|
token: string;
|
|
}
|
|
|
|
export const getUserByVerificationToken = async ({ token }: GetUserByVerificationTokenOptions) => {
|
|
return await prisma.user.findFirstOrThrow({
|
|
where: {
|
|
VerificationToken: {
|
|
some: {
|
|
token,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
};
|