Poll Comfy history and the job snapshot so the browser still gets the video when the live stream is buffered or the websocket misses completion. Co-authored-by: Cursor <cursoragent@cursor.com>
9 lines
252 B
TypeScript
9 lines
252 B
TypeScript
export default defineEventHandler((event) => {
|
|
const id = getRouterParam(event, 'id')
|
|
const job = id ? getJob(id) : undefined
|
|
if (!job) {
|
|
throw createError({ statusCode: 404, statusMessage: 'Job not found' })
|
|
}
|
|
return jobSnapshot(job)
|
|
})
|