From a32a778538a9f303d9fadd04208706a73b63dbbf Mon Sep 17 00:00:00 2001 From: Simon Voordouw Date: Thu, 18 May 2017 14:55:42 +0200 Subject: [PATCH] add supportedPrinters api call --- src/api/config.js | 3 +++ src/api/printer.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/config.js b/src/api/config.js index 8a9e010..4fbdfe6 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -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`); + } } diff --git a/src/api/printer.js b/src/api/printer.js index 6d99b54..7c77e7f 100644 --- a/src/api/printer.js +++ b/src/api/printer.js @@ -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);