11 lines
427 B
TypeScript
11 lines
427 B
TypeScript
import { toggleStudioQueuePause } from '~/server/utils/studioQueue'
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const { owner } = assertLibraryOwner(event)
|
|
const body = await readBody<{ resume?: boolean; jobId?: string }>().catch(() => ({} as { resume?: boolean; jobId?: string }))
|
|
return toggleStudioQueuePause(owner, {
|
|
resume: body?.resume,
|
|
jobId: body?.jobId ? String(body.jobId) : undefined
|
|
})
|
|
})
|