@cpzxrobot/sdk 1.3.73 → 1.3.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/device_gateway.ts +1 -1
- package/dist/device_gateway.js +1 -1
- package/package.json +1 -1
package/device_gateway.ts
CHANGED
|
@@ -996,7 +996,7 @@ export class DeviceGateway extends Object {
|
|
|
996
996
|
|
|
997
997
|
if (!factoryId) {
|
|
998
998
|
const farm = await this.context.user.getSelectedFarm();
|
|
999
|
-
factoryId = farm?.
|
|
999
|
+
factoryId = farm?.id || 0;
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
1002
|
return axios.get(`/api/v2/device/stat/alarms`, {
|
package/dist/device_gateway.js
CHANGED
|
@@ -790,7 +790,7 @@ class DeviceGateway extends Object {
|
|
|
790
790
|
const axios = yield this.context.ready;
|
|
791
791
|
if (!factoryId) {
|
|
792
792
|
const farm = yield this.context.user.getSelectedFarm();
|
|
793
|
-
factoryId = (farm === null || farm === void 0 ? void 0 : farm.
|
|
793
|
+
factoryId = (farm === null || farm === void 0 ? void 0 : farm.id) || 0;
|
|
794
794
|
}
|
|
795
795
|
return axios.get(`/api/v2/device/stat/alarms`, {
|
|
796
796
|
params: { factoryId }
|