Files
aigen/server/api/library/clips/[id].delete.ts
T
TowstyandCursor e334cb7a7a Move library collections as a group and map v2 identity refs.
Collapsed collection actions now move, rename, delete, and rerun every part so chains stay together. Identity mode follows the v2u3 Ref2VA picture wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 22:56:37 -05:00

11 lines
431 B
TypeScript

export default defineEventHandler(async (event) => {
const { owner } = assertLibraryOwner(event)
const id = String(getRouterParam(event, 'id') || '')
const clip = getClip(owner, id)
assertFolderAccess(event, clip.folderId)
const family = ['1', 'true'].includes(String(getQuery(event).family || '').toLowerCase())
if (family) await deleteClipFamily(owner, id)
else await deleteClip(owner, id)
return { ok: true }
})