Characters live on the sequence with per-scene on/off and outfit picks; Copy scene exports only the active tab; legacy saves still open.
17 lines
579 B
TypeScript
17 lines
579 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; scenes?: unknown }>(event).catch(() => ({}))
|
|
const sequence = await updatePromptSequence(owner, id, {
|
|
name: body?.name,
|
|
characters: body?.characters,
|
|
scenes: body?.scenes
|
|
})
|
|
return {
|
|
sequence,
|
|
sequences: listPromptSequences(owner)
|
|
}
|
|
})
|