mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-11-14 00:17:55 +01:00
clean up
code is in single line
This commit is contained in:
parent
3cb9990a47
commit
2e3b174d3b
@ -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`);
|
||||
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user