Files
aigen/server/api/library/clips/[id].patch.ts
T
TowstyandCursor dbe45fd2ff Add generation quality controls and bind them to the MiniMax workflow.
Expose aspect, CFG, FPS, sampler, and scheduler in Generation settings, persist them on clips and held jobs, and inject those values into the Comfy graph. Keep the image picker stills-only and allow renaming library clips.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 22:55:06 -05:00

19 lines
790 B
TypeScript

export default defineEventHandler(async (event) => {
const { owner } = assertLibraryOwner(event)
const id = String(getRouterParam(event, 'id') || '')
const body = await readBody<{ folderId?: string; name?: string }>(event).catch(() => ({} as { folderId?: string; name?: string }))
const folderId = String(body?.folderId || '')
const hasName = typeof body?.name === 'string'
if (!folderId && !hasName) {
throw createError({ statusCode: 400, statusMessage: 'Choose a library folder or a new name' })
}
const clip = getClip(owner, id)
assertFolderAccess(event, clip.folderId)
if (folderId) {
assertFolderExists(event, folderId)
await moveClip(owner, id, folderId)
}
if (hasName) await renameClip(owner, id, body.name || '')
return publicLibrary(event)
})