@cpzxrobot/sdk 1.1.16 → 1.1.17
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_type_gateway.ts
CHANGED
|
@@ -14,7 +14,7 @@ export class DeviceTypeGateway {
|
|
|
14
14
|
if (this.deviceTypes) {
|
|
15
15
|
return Promise.resolve(this.deviceTypes)
|
|
16
16
|
}
|
|
17
|
-
return this.context.axios.get('/api/
|
|
17
|
+
return this.context.axios.get('/api/v1/device/type')
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
alarmConfigForUnit(unit: Unit): Promise<any> {
|
|
@@ -10,7 +10,7 @@ class DeviceTypeGateway {
|
|
|
10
10
|
if (this.deviceTypes) {
|
|
11
11
|
return Promise.resolve(this.deviceTypes);
|
|
12
12
|
}
|
|
13
|
-
return this.context.axios.get('/api/
|
|
13
|
+
return this.context.axios.get('/api/v1/device/type');
|
|
14
14
|
}
|
|
15
15
|
alarmConfigForUnit(unit) {
|
|
16
16
|
return this.context.ready.then((axios) => {
|
package/dist/pigfarm_gateway.js
CHANGED
|
@@ -65,7 +65,7 @@ class PigfarmGateway extends Object {
|
|
|
65
65
|
//根据单元类型和传感器类型获取告警阈值曲线
|
|
66
66
|
threshold(data, sensorType) {
|
|
67
67
|
return this.context.ready.then((axios) => {
|
|
68
|
-
return axios.get(`/api/v1/pigfarm/alertThershold/${data.
|
|
68
|
+
return axios.get(`/api/v1/pigfarm/alertThershold/${data.id}/${sensorType}`, data);
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
get relay() {
|
package/package.json
CHANGED
package/pigfarm_gateway.ts
CHANGED
|
@@ -85,7 +85,7 @@ export class PigfarmGateway extends Object {
|
|
|
85
85
|
threshold(data: Unit, sensorType: String) {
|
|
86
86
|
return this.context.ready.then((axios) => {
|
|
87
87
|
return axios.get(
|
|
88
|
-
`/api/v1/pigfarm/alertThershold/${data.
|
|
88
|
+
`/api/v1/pigfarm/alertThershold/${data.id}/${sensorType}`,
|
|
89
89
|
data
|
|
90
90
|
);
|
|
91
91
|
});
|