Client/update requested #42

Merged
KevinMidboe merged 16 commits from client/update_requested into master 2017-10-20 16:13:30 +00:00
Showing only changes of commit b2f4151850 - Show all commits

View File

@@ -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 (
<div key={element_key}>
<Notifications />
@@ -89,7 +98,8 @@ class MovieObject {
</MediaQuery>
<span className='imdbLogo'>
<span className='imdbLogo'>
</span>
<div style={movieStyle.buttons}>