From 2be6cbb5e3cbcdebfc1b3bdda00b0f63110ebb32 Mon Sep 17 00:00:00 2001 From: Eric Stobbart Date: Fri, 13 Jan 2023 13:29:10 -0500 Subject: [PATCH] TMDB API Update --- src/api/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index e6f031e..41703df 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -7,7 +7,6 @@ const basePosterSize = 'w185'; const defaultFetchParams = { headers: { 'Content-Type': 'application/json', - Authorization: 'Bearer ' + API_KEY_V4, }, }; @@ -16,7 +15,8 @@ export function getImageUrl(path, posterSize = basePosterSize) { } function get(path, params = {}) { - return fetch(API_BASE + path, { + path += path.indexOf('?') == -1 ? '?' : '&'; + return fetch(API_BASE + path + 'api_key=' + API_KEY_V4, { ...defaultFetchParams, ...params, }).then((r) => r.json());