Skip to content

Commit

Permalink
Fixed page insertion to leverage server-mapped values
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarpouzis committed Mar 20, 2024
1 parent f58d453 commit 87d90e8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/ui/src/Pages/InsertPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ function InsertPage() {
}

function omdbMapMovie(movieData) {
// Ratings come back in a source/value array
// imdb gets a special property, but RT doesn't and must be formatted
const rtRating = movieData.ratings.filter((rating) => rating.source == "Rotten Tomatoes");

let movie = {
title: movieData.title,
simpleTitle: movieData.title,
Expand All @@ -62,7 +58,7 @@ function InsertPage() {
actors: movieData.actors,
plot: movieData.plot,
imdbRating: movieData.imdbRating,
tomatoRating: rtRating[0].value.replace("%", ""),
tomatoRating: movieData.tomatoRating,
imdbID: movieData.imdbID,
posterLink: movieData.poster,
};
Expand Down

0 comments on commit 87d90e8

Please sign in to comment.