feat: templates
This commit is contained in:
committed by
Mythie
parent
6d34ebd91b
commit
31a9127c9e
12
packages/lib/server-only/template/delete-template.ts
Normal file
12
packages/lib/server-only/template/delete-template.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
'use server';
|
||||
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export type DeleteTemplateOptions = {
|
||||
id: number;
|
||||
userId: number;
|
||||
};
|
||||
|
||||
export const deleteTemplate = async ({ id, userId }: DeleteTemplateOptions) => {
|
||||
return await prisma.template.delete({ where: { id, userId } });
|
||||
};
|
||||
Reference in New Issue
Block a user