chore: tidy code and extract alert-dialog

This commit is contained in:
Lucas Smith
2024-02-25 11:12:18 +00:00
parent 7226d5ac53
commit 9cf72e1442
7 changed files with 156 additions and 111 deletions

View File

@ -0,0 +1,17 @@
import { prisma } from '@documenso/prisma';
export const deletedAccountServiceAccount = async () => {
const serviceAccount = await prisma.user.findFirst({
where: {
email: 'deleted-account@documenso.com',
},
});
if (!serviceAccount) {
throw new Error(
'Deleted account service account not found, have you ran the appropriate migrations?',
);
}
return serviceAccount;
};