Sets and beats filter by shot size; scenes reorder/delete; portrait links Prompt Builder; landscape queue collapses; per-engine look settings and prompt Clear persist across iOS resumes.
18 lines
617 B
TypeScript
18 lines
617 B
TypeScript
import { listPromptSequences, updatePromptSequence } from '~/server/utils/promptSequences'
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const { owner } = assertLibraryOwner(event)
|
|
const id = String(getRouterParam(event, 'id') || '')
|
|
const body = await readBody<{ name?: string; characters?: unknown; sets?: unknown; scenes?: unknown }>(event).catch(() => ({}))
|
|
const sequence = await updatePromptSequence(owner, id, {
|
|
name: body?.name,
|
|
characters: body?.characters,
|
|
sets: body?.sets,
|
|
scenes: body?.scenes
|
|
})
|
|
return {
|
|
sequence,
|
|
sequences: listPromptSequences(owner)
|
|
}
|
|
})
|