From e6796aff8b31abf13ad854dce63b09b263326fef Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Tue, 4 Jun 2019 21:41:10 +0200 Subject: [PATCH] =?UTF-8?q?Hotfix=20=F0=9F=A7=AF=20for=20returning=20new?= =?UTF-8?q?=20poster=20object=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seasoned_api/src/plex/requestRepository.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/seasoned_api/src/plex/requestRepository.js b/seasoned_api/src/plex/requestRepository.js index 447384e..7006758 100644 --- a/seasoned_api/src/plex/requestRepository.js +++ b/seasoned_api/src/plex/requestRepository.js @@ -86,7 +86,11 @@ class RequestRepository { } throw new Error('Unable to fetch your requests'); }) - .then((result) => { return result; }); + .then((result) => { + // TODO do a correct mapping before sending, not just a dump of the database + result.map(item => item.poster = item.poster_path) + return result + }); } updateRequestedById(id, type, status) {