mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-12-22 22:03:48 +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`);
|
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`);
|
||||||
|
@ -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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user