chore: updated GitHub Action

This commit is contained in:
pit
2023-09-26 11:16:33 +01:00
parent 1b31d590a5
commit 2e2ef4c20b
11 changed files with 386 additions and 41 deletions

View File

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