Skip to content

Commit

Permalink
Merge pull request #270 from leepeuker/fix-broken-movie-refresh-buttons
Browse files Browse the repository at this point in the history
Fix hardcoded movie id in refresh buttons on movie detail pages
  • Loading branch information
leepeuker authored Feb 2, 2023
2 parents 4f745ff + e118c28 commit 306cf2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/js/movie.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function refreshTmdbData() {
}

async function refreshTmdbDataRequest() {
const response = await fetch('/movies/303/refresh-tmdb')
const response = await fetch('/movies/' + getMovieId() + '/refresh-tmdb')

if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`)
Expand All @@ -351,7 +351,7 @@ function refreshImdbRating() {
}

async function refreshImdbRatingRequest() {
const response = await fetch('/movies/303/refresh-imdb')
const response = await fetch('/movies/' + getMovieId() + '/refresh-imdb')

if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`)
Expand Down

0 comments on commit 306cf2a

Please sign in to comment.