Merge pull request #502 from documenso/feat/add-e2e-testing-playwright

feat: add playwright
This commit is contained in:
Lucas Smith
2023-10-14 12:21:18 +11:00
committed by GitHub
10 changed files with 600 additions and 13 deletions

View File

@ -0,0 +1,25 @@
import { prisma } from '@documenso/prisma';
export type DeleteUserOptions = {
email: string;
}
export const deleteUser = async ({ email }: DeleteUserOptions) => {
const user = await prisma.user.findFirst({
where: {
email: {
contains: email,
},
},
});
if (!user) {
throw new Error(`User with email ${email} not found`);
}
return await prisma.user.delete({
where: {
id: user.id,
},
});
};