Skip to content

Commit

Permalink
Public API: Ah, forgot to append the credits.
Browse files Browse the repository at this point in the history
  • Loading branch information
e3ndr committed Sep 21, 2023
1 parent 0e98972 commit 5159bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public-api/src/routes/search.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default (/** @type {import("itty-router").RouterType<import("itty-router"

for (const { id: movieId } of searchResult.results) {
results.push(
await fetch(`https://api.themoviedb.org/3/movie/${encodeURI(movieId)}?append_to_response=image&api_key=${encodeURIComponent(env.TMDB_API_KEY)}`)
await fetch(`https://api.themoviedb.org/3/movie/${encodeURI(movieId)}?append_to_response=image,credits&api_key=${encodeURIComponent(env.TMDB_API_KEY)}`)
.then((response) => response.json())
.then((movieData) => {
const [releaseYear, releaseMonth, releaseDay] = movieData.release_date.split("-");
Expand Down

0 comments on commit 5159bd1

Please sign in to comment.