chore: refactor

This commit is contained in:
Catalin Pit
2024-01-25 15:42:40 +02:00
parent ffee2b2c9a
commit 49ecfc1a2c
7 changed files with 13 additions and 66 deletions

View File

@ -9,8 +9,5 @@ export const getUserByEmail = async ({ email }: GetUserByEmailOptions) => {
where: {
email: email.toLowerCase(),
},
include: {
VerificationToken: true,
},
});
};

View File

@ -1,17 +0,0 @@
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,
},
},
},
});
};