Add Prowlarr indexer integration (step 1: config + manual search). Allows searching for comics/ebooks releases on Prowlarr indexers directly from the series detail page, with download links and per-volume search for missing books. - Backend: new prowlarr module with search and test endpoints - Migration: add prowlarr settings (url, api_key, categories) - Settings UI: Prowlarr config card with test connection button - ProwlarrSearchModal: auto-search on open, missing volumes shortcuts - Fix series.readCount i18n plural parameter on series pages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
531 B
TypeScript
17 lines
531 B
TypeScript
import { NextResponse, NextRequest } from "next/server";
|
|
import { apiFetch } from "@/lib/api";
|
|
|
|
export async function POST(request: NextRequest) {
|
|
try {
|
|
const body = await request.json();
|
|
const data = await apiFetch("/prowlarr/search", {
|
|
method: "POST",
|
|
body: JSON.stringify(body),
|
|
});
|
|
return NextResponse.json(data);
|
|
} catch (error) {
|
|
const message = error instanceof Error ? error.message : "Failed to search Prowlarr";
|
|
return NextResponse.json({ error: message }, { status: 500 });
|
|
}
|
|
}
|