0
0
mirror of https://github.com/Doodle3D/Doodle3D-API synced 2024-12-22 22:03:48 +01:00
code is in single line
This commit is contained in:
casperlamboo 2016-07-20 10:16:53 +02:00
parent 3cb9990a47
commit 2e3b174d3b
2 changed files with 4 additions and 12 deletions

View File

@ -14,9 +14,7 @@ export default class Network {
return rest.get(`${ this.api }network/status`); return rest.get(`${ this.api }network/status`);
} }
assosiate(ssid, phrase, recreate = false) { assosiate(ssid, phrase, recreate = false) {
const data = { ssid, recreate, phrase }; return rest.post(`${ this.api }network/associate`, { ssid, phrase, recreate });
return rest.post(`${ this.api }network/associate`, data);
} }
disassociate() { disassociate() {
//not tested //not tested
@ -27,9 +25,7 @@ export default class Network {
return rest.post(`${ this.api }network/openap`, {}); return rest.post(`${ this.api }network/openap`, {});
} }
remove(ssid) { remove(ssid) {
return rest.post(`${ this.api }network/remove`, { return rest.post(`${ this.api }network/remove`, { ssid });
'ssid': ssid
});
} }
signin() { signin() {
return rest.get(`${ this.api }network/signin`); return rest.get(`${ this.api }network/signin`);

View File

@ -20,13 +20,9 @@ export default class Printer {
return rest.post(`${ this.api }printer/heatup`, {}); return rest.post(`${ this.api }printer/heatup`, {});
} }
print(gcode = '', first = false, start = false, last) { print(gcode = '', first = false, start = false, last) {
const data = { gcode, first, start, last }; return rest.post(`${ this.api }printer/print`, { gcode, first, start, last });
return rest.post(`${ this.api }printer/print`, data);
} }
stop(gcode = '') { stop(gcode = '') {
const data = { gcode }; return rest.post(`${ this.api }printer/stop`, { gcode });
return rest.post(`${ this.api }printer/stop`, data);
} }
} }