MCPcopy Create free account
hub / github.com/code100x/cms / deleteEvent

Function deleteEvent

src/actions/event-actions/index.ts:43–50  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

41}
42
43export async function deleteEvent(id: number) {
44 if (!(await isAdmin())) {
45 return { error: 'Unauthorized' };
46 }
47
48 await prisma.event.delete({ where: { id } });
49 revalidatePath('/');
50}

Callers 1

handleDeleteEventFunction · 0.90

Calls 1

isAdminFunction · 0.85

Tested by

no test coverage detected