Add setup page and graceful handling for missing TMDB API key

Without TMDB_API_KEY the app silently fails on search and import.
This adds a /setup page that guides admins through obtaining and
configuring the key, redirects unconfigured visitors from the
landing page, and returns clear error messages from the search API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 13:30:31 -05:00
co-authored by Claude Opus 4.6
parent fa57bf9476
commit 8fc4c110b6
6 changed files with 319 additions and 1 deletions
+8
View File
@@ -0,0 +1,8 @@
import { NextResponse } from "next/server";
import { isTmdbConfigured } from "@/lib/config";
export async function GET() {
return NextResponse.json({
tmdbConfigured: isTmdbConfigured(),
});
}