diff --git a/client/app/components/MovieObject.jsx b/client/app/components/MovieObject.jsx index 152b004..64ea04c 100644 --- a/client/app/components/MovieObject.jsx +++ b/client/app/components/MovieObject.jsx @@ -7,6 +7,10 @@ import movieStyle from './styles/movieObjectStyle.jsx'; var MediaQuery = require('react-responsive'); +import RequestButton from './buttons/request_button.jsx'; + +import { fetchJSON } from './http.jsx'; + class MovieObject { constructor(object) { this.id = object.id; @@ -27,9 +31,13 @@ class MovieObject { requestMovie() { // fetch('http://localhost:31459/api/v1/plex/request/' + this.id + '?type='+this.type, { - fetch('https://apollo.kevinmidboe.com/api/v1/plex/request/' + this.id + '?type='+this.type, { - method: 'POST' - }); + // fetch('https://apollo.kevinmidboe.com/api/v1/plex/request/' + this.id + '?type='+this.type, { + // method: 'POST' + // }); + fetchJSON('https://apollo.kevinmidboe.com/api/v1/plex/request/' + this.id + '?type='+this.type, 'POST') + .then((response) => { + console.log(response); + }) notify.show(this.title + ' requested!', 'success', 3000); } @@ -61,6 +69,7 @@ class MovieObject { + // TODO add request button class return (