mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
14 lines
291 B
TypeScript
14 lines
291 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
export interface GetUserByEmailOptions {
|
|
email: string;
|
|
}
|
|
|
|
export const getUserByEmail = async ({ email }: GetUserByEmailOptions) => {
|
|
return await prisma.user.findFirstOrThrow({
|
|
where: {
|
|
email: email.toLowerCase(),
|
|
},
|
|
});
|
|
};
|