Files
sofa/lib/config.ts
T
jakeandClaude Opus 4.6 8fc4c110b6 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>
2026-03-01 13:30:31 -05:00

9 lines
209 B
TypeScript

/**
* Server-side configuration checks.
* Call these in route handlers or server components — never on the client.
*/
export function isTmdbConfigured(): boolean {
return !!process.env.TMDB_API_KEY;
}