Skip to content

Commit 3b1f9a6

Browse files
committed
some formatting cleanup
1 parent f405c16 commit 3b1f9a6

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

ecoflow-api.js

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,18 @@ module.exports = function(RED) {
1717
host: ecoflowApiServer,
1818
});
1919

20-
node.queryQuotaAll = function(sn) {
21-
return client.getDevicePropertiesPlain(sn);
22-
}
23-
node.queryDeviceList = function() {
24-
return client.requestHandler.get(client.deviceListUrl);
25-
}
26-
node.setQuotaSelective = function(sn, values) {
27-
return client.setCommandPlain({sn: sn, ...values });
28-
}
29-
node.queryMqttCert = function() {
30-
return client.getMqttCredentials();
31-
}
32-
node.getSpecificDevice = function(sn) {
33-
return client.getDevice(sn);
34-
}
20+
node.queryQuotaAll = (sn) => client.getDevicePropertiesPlain(sn);
21+
node.queryDeviceList = () => client.requestHandler.get(client.deviceListUrl);
22+
node.setQuotaSelective = (sn, values) => client.setCommandPlain({sn: sn, ...values });
23+
node.queryMqttCert = () => client.getMqttCredentials()
24+
node.getSpecificDevice = (sn) => client.getDevice(sn);
3525
}
3626

3727
RED.nodes.registerType("ecoflow-api-server", RemoteServerNode, {
3828
credentials: {
3929
access_key: { type: "text" },
4030
secret_key: { type: "password" }
41-
}});
42-
31+
}
32+
}
33+
);
4334
}

0 commit comments

Comments
 (0)