add supportedPrinters api call

This commit is contained in:
Simon Voordouw 2017-05-18 14:55:42 +02:00
parent c838625a86
commit a32a778538
2 changed files with 3 additions and 1 deletions

View File

@ -13,4 +13,7 @@ export default class Config {
set(data) {
return rest.post(`${ this.api }config`, data);
}
supportedPrinters() {
return rest.get(`${ this.api }config/supportedprinters`);
}
}

View File

@ -28,7 +28,6 @@ export default class Printer {
fetch(gcode = '') {
rest.post(`https://tranquil-meadow-94621.herokuapp.com/upload`, { gcode })
.then(response => {
console.log(`gcode file id: ${ response }`);
rest.post(`${ this.api }printer/fetch`, { id: response.id });
}).catch(err => {
console.log(err);