Correctly export poster_path from person tmdb response object.

This commit is contained in:
2020-04-08 23:09:37 +02:00
parent fce8879994
commit 08433523b7

View File

@@ -12,12 +12,12 @@ class Person {
} }
static convertFromTmdbResponse(response) { static convertFromTmdbResponse(response) {
const { id, name, poster, birthday, deathday, adult, known_for_department } = response; const { id, name, profile_path, birthday, deathday, adult, known_for_department } = response;
const birthDay = new Date(birthday) const birthDay = new Date(birthday)
const deathDay = deathday ? new Date(deathday) : null const deathDay = deathday ? new Date(deathday) : null
return new Person(id, name, poster, birthDay, deathDay, adult, known_for_department) return new Person(id, name, profile_path, birthDay, deathDay, adult, known_for_department)
} }
createJsonResponse() { createJsonResponse() {