throw error if missing MOVIE_WEB_TMDB_API_KEY

This commit is contained in:
Jonathan Barrow 2023-09-26 13:25:54 -04:00
parent 6f29b636ea
commit 7804b3bf91
No known key found for this signature in database
GPG Key ID: E86E9FE9049C741F
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ type CommandLineArguments = {
const TMDB_API_KEY = process.env.MOVIE_WEB_TMDB_API_KEY;
if (!TMDB_API_KEY?.trim()) {
throw new Error('Missing MOVIE_WEB_TMDB_API_KEY environment variable');
}
const sources = getAllSources();
function getAllSources() {