Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
43
export
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
handleDeleteEvent
Function · 0.90
Calls
1
isAdmin
Function · 0.85
Tested by
no test coverage detected