diff --git a/src/api/network.js b/src/api/network.js index 0348bc2..af15500 100644 --- a/src/api/network.js +++ b/src/api/network.js @@ -14,9 +14,7 @@ export default class Network { return rest.get(`${ this.api }network/status`); } assosiate(ssid, phrase, recreate = false) { - const data = { ssid, recreate, phrase }; - - return rest.post(`${ this.api }network/associate`, data); + return rest.post(`${ this.api }network/associate`, { ssid, phrase, recreate }); } disassociate() { //not tested @@ -27,9 +25,7 @@ export default class Network { return rest.post(`${ this.api }network/openap`, {}); } remove(ssid) { - return rest.post(`${ this.api }network/remove`, { - 'ssid': ssid - }); + return rest.post(`${ this.api }network/remove`, { ssid }); } signin() { return rest.get(`${ this.api }network/signin`); diff --git a/src/api/printer.js b/src/api/printer.js index 1d1a53d..a01e4bf 100644 --- a/src/api/printer.js +++ b/src/api/printer.js @@ -20,13 +20,9 @@ export default class Printer { return rest.post(`${ this.api }printer/heatup`, {}); } print(gcode = '', first = false, start = false, last) { - const data = { gcode, first, start, last }; - - return rest.post(`${ this.api }printer/print`, data); + return rest.post(`${ this.api }printer/print`, { gcode, first, start, last }); } stop(gcode = '') { - const data = { gcode }; - - return rest.post(`${ this.api }printer/stop`, data); + return rest.post(`${ this.api }printer/stop`, { gcode }); } }