From 850452db78e8d2bf2b83147549876bb4708bb57d Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Sun, 3 Sep 2017 17:07:53 +0200 Subject: [PATCH] Removed unnesessary this.id when calling function, this is already a object, don't need to pass itself. --- client/app/components/MovieObject.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/app/components/MovieObject.jsx b/client/app/components/MovieObject.jsx index e1be5d9..09da015 100644 --- a/client/app/components/MovieObject.jsx +++ b/client/app/components/MovieObject.jsx @@ -7,6 +7,7 @@ class MovieObject { this.id = object.id; this.title = object.title; this.year = object.year; + this.type = object.type; // Check if object.poster != undefined this.poster = object.poster; this.matchedInPlex = object.matchedInPlex; @@ -17,8 +18,9 @@ class MovieObject { console.log('Exists', movie); } - requestMovie(id) { - fetch('https://apollo.kevinmidboe.com/api/v1/plex/request/' + id, { + requestMovie() { + // fetch('https://apollo.kevinmidboe.com/api/v1/plex/request/' + id, { + fetch('http://localhost:31459/api/v1/plex/request/' + this.id + '?type='+this.type, { method: 'POST' }); } @@ -106,7 +108,7 @@ class MovieObject { foundInPlex = ; } else { - foundInPlex = ; }