@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.
@@ -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/v2/factory/${id}/apps`;
29
+ var url = `/api/v1/factory/${id}/apps`;
30
30
  if (withRoles) {
31
31
  url += "/roles";
32
32
  }
@@ -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/add`, Object.assign(Object.assign({}, data), { factoryId: factory.id, templateName: name }));
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
  },
@@ -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/v2/factory/${id}/apps`;
34
+ var url = `/api/v1/factory/${id}/apps`;
35
35
  if (withRoles) {
36
36
  url += "/roles";
37
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -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/add`, {
261
+ return axios.post(`/api/v1/pigfarm/heatLamp/config/template`, {
262
262
  ...data,
263
263
  factoryId: factory.id,
264
264
  templateName: name,