mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
chore: refactor
This commit is contained in:
@ -9,8 +9,5 @@ export const getUserByEmail = async ({ email }: GetUserByEmailOptions) => {
|
||||
where: {
|
||||
email: email.toLowerCase(),
|
||||
},
|
||||
include: {
|
||||
VerificationToken: true,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user