Send Prowlarr search results directly to qBittorrent from the modal. Backend authenticates via SID cookie (login + add torrent endpoints). - Backend: qbittorrent module with add and test endpoints - Migration: add qbittorrent settings (url, username, password) - Settings UI: qBittorrent config card with test connection - ProwlarrSearchModal: send-to-qBittorrent button per result row with spinner/checkmark state progression - Button only shown when qBittorrent is configured Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
395 B
TypeScript
13 lines
395 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { apiFetch } from "@/lib/api";
|
|
|
|
export async function GET() {
|
|
try {
|
|
const data = await apiFetch("/qbittorrent/test");
|
|
return NextResponse.json(data);
|
|
} catch (error) {
|
|
const message = error instanceof Error ? error.message : "Failed to test qBittorrent";
|
|
return NextResponse.json({ error: message }, { status: 500 });
|
|
}
|
|
}
|