- Add metadata_batch job type with background processing via tokio::spawn - Auto-apply metadata only when single result at 100% confidence - Support primary + fallback provider per library, "none" to opt out - Add batch report/results API endpoints and job detail UI - Add series_status and has_missing filters to both series listing pages - Add GET /series/statuses endpoint for dynamic filter options - Normalize series_metadata status values (migration 0036) - Hide ComicVine provider tab when no API key configured - Translate entire backoffice UI from English to French Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
792 B
TypeScript
20 lines
792 B
TypeScript
import { NextRequest, NextResponse } from "next/server";
|
|
import { apiFetch, MetadataBatchResultDto } from "@/lib/api";
|
|
|
|
export async function GET(request: NextRequest) {
|
|
try {
|
|
const { searchParams } = new URL(request.url);
|
|
const id = searchParams.get("id");
|
|
if (!id) {
|
|
return NextResponse.json({ error: "id is required" }, { status: 400 });
|
|
}
|
|
const status = searchParams.get("status") || "";
|
|
const params = status ? `?status=${status}` : "";
|
|
const data = await apiFetch<MetadataBatchResultDto[]>(`/metadata/batch/${id}/results${params}`);
|
|
return NextResponse.json(data);
|
|
} catch (error) {
|
|
const message = error instanceof Error ? error.message : "Failed to fetch results";
|
|
return NextResponse.json({ error: message }, { status: 500 });
|
|
}
|
|
}
|