Held jobs restore the form after a 3-minute wait, hidden stills stay blurred in the picker, and reloading Comfy no longer leaves xaigen spinning. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
599 B
TypeScript
15 lines
599 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
const { owner } = assertLibraryOwner(event)
|
|
const id = String(getRouterParam(event, 'id') || '')
|
|
const body = await readBody<{ folderId?: string }>(event).catch(() => ({} as { folderId?: string }))
|
|
const folderId = String(body?.folderId || '')
|
|
if (!folderId) {
|
|
throw createError({ statusCode: 400, statusMessage: 'Choose a library folder' })
|
|
}
|
|
const clip = getClip(owner, id)
|
|
assertFolderAccess(event, clip.folderId)
|
|
assertFolderExists(event, folderId)
|
|
await moveClip(owner, id, folderId)
|
|
return publicLibrary(event)
|
|
})
|