@cpzxrobot/sdk 1.1.6 → 1.1.8
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/dist/factory_gateway.js +1 -1
- package/dist/pigfarm_gateway.js +1 -1
- package/factory_gateway.ts +1 -1
- package/package.json +1 -1
- package/pigfarm_gateway.ts +1 -1
package/dist/factory_gateway.js
CHANGED
|
@@ -26,7 +26,7 @@ class FactoryGateway extends Object {
|
|
|
26
26
|
//获得工厂的应用信息, 如果指定withRoles为true,则返回app和app的详细角色信息
|
|
27
27
|
async apps(id, withRoles = false) {
|
|
28
28
|
var axios = await this.context.ready;
|
|
29
|
-
var url = `/api/
|
|
29
|
+
var url = `/api/v1/factory/${id}/apps`;
|
|
30
30
|
if (withRoles) {
|
|
31
31
|
url += "/roles";
|
|
32
32
|
}
|
package/dist/pigfarm_gateway.js
CHANGED
|
@@ -207,7 +207,7 @@ class PigfarmGateway extends Object {
|
|
|
207
207
|
//增加模板
|
|
208
208
|
add: (factory, name, data) => {
|
|
209
209
|
return this.context.ready.then((axios) => {
|
|
210
|
-
return axios.post(`/api/v1/pigfarm/heatLamp/config/
|
|
210
|
+
return axios.post(`/api/v1/pigfarm/heatLamp/config/template`, Object.assign(Object.assign({}, data), { factoryId: factory.id, templateName: name }));
|
|
211
211
|
});
|
|
212
212
|
},
|
|
213
213
|
},
|
package/factory_gateway.ts
CHANGED
|
@@ -31,7 +31,7 @@ export class FactoryGateway extends Object {
|
|
|
31
31
|
//获得工厂的应用信息, 如果指定withRoles为true,则返回app和app的详细角色信息
|
|
32
32
|
async apps(id: number, withRoles = false): Promise<any> {
|
|
33
33
|
var axios = await this.context.ready;
|
|
34
|
-
var url = `/api/
|
|
34
|
+
var url = `/api/v1/factory/${id}/apps`;
|
|
35
35
|
if (withRoles) {
|
|
36
36
|
url += "/roles";
|
|
37
37
|
}
|
package/package.json
CHANGED
package/pigfarm_gateway.ts
CHANGED
|
@@ -258,7 +258,7 @@ export class PigfarmGateway extends Object {
|
|
|
258
258
|
//增加模板
|
|
259
259
|
add: (factory: Factory, name:String,data: HeatLamp) => {
|
|
260
260
|
return this.context.ready.then((axios) => {
|
|
261
|
-
return axios.post(`/api/v1/pigfarm/heatLamp/config/
|
|
261
|
+
return axios.post(`/api/v1/pigfarm/heatLamp/config/template`, {
|
|
262
262
|
...data,
|
|
263
263
|
factoryId: factory.id,
|
|
264
264
|
templateName: name,
|