modifyDeviceStatus.js 697 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.setDeviceRate = exports.changeDeviceUnit = exports.modifyDeviceStatus = void 0;
  4. var dataUtil_1 = require("./dataUtil");
  5. var modifyDeviceStatus = function (id, status) {
  6. return (0, dataUtil_1.appendData)('disabled.json', [id], status);
  7. };
  8. exports.modifyDeviceStatus = modifyDeviceStatus;
  9. var changeDeviceUnit = function (id, unit) {
  10. return (0, dataUtil_1.appendData)('unit.json', [id], unit);
  11. };
  12. exports.changeDeviceUnit = changeDeviceUnit;
  13. var setDeviceRate = function (id, rate) {
  14. return (0, dataUtil_1.appendData)('rate.json', [id], rate);
  15. };
  16. exports.setDeviceRate = setDeviceRate;