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`);
}
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`);

View File

@ -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 });
}
}