Files
stripstream-librarian/apps/backoffice/app/api/jobs/list/route.ts
Froidefond Julien b2e59d8aa1 fix: refresh jobs list immediately after replay
Add /api/jobs/list endpoint and fetch the updated list right after
a successful replay so the new job appears instantly instead of
waiting for the next SSE poll (up to 15s when idle).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 21:19:47 +01:00

12 lines
300 B
TypeScript

import { NextResponse } from "next/server";
import { listJobs } from "@/lib/api";
export async function GET() {
try {
const data = await listJobs();
return NextResponse.json(data);
} catch (error) {
return NextResponse.json({ error: "Failed to fetch jobs" }, { status: 500 });
}
}