@cpzxrobot/sdk 1.3.55 → 1.3.56
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/user_gateway.js +6 -2
- package/package.json +1 -1
- package/user_gateway.ts +6 -2
package/dist/user_gateway.js
CHANGED
|
@@ -266,10 +266,14 @@ class UserGateway extends Object {
|
|
|
266
266
|
},
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
async info() {
|
|
269
|
+
async info(userId) {
|
|
270
270
|
var axios = await this.context.ready;
|
|
271
271
|
var factory = await this.context.user.getSelectedFarm();
|
|
272
|
-
|
|
272
|
+
var url = '/api/v1/user/info';
|
|
273
|
+
if (userId) {
|
|
274
|
+
url += `/${userId}`;
|
|
275
|
+
}
|
|
276
|
+
return axios.get(url, {
|
|
273
277
|
params: {
|
|
274
278
|
selected_factory: factory,
|
|
275
279
|
},
|
package/package.json
CHANGED
package/user_gateway.ts
CHANGED
|
@@ -322,10 +322,14 @@ export class UserGateway extends Object {
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
async info() {
|
|
325
|
+
async info(userId: number|undefined) {
|
|
326
326
|
var axios = await this.context.ready
|
|
327
327
|
var factory = await this.context.user.getSelectedFarm()
|
|
328
|
-
|
|
328
|
+
var url = '/api/v1/user/info'
|
|
329
|
+
if (userId) {
|
|
330
|
+
url += `/${userId}`
|
|
331
|
+
}
|
|
332
|
+
return axios.get(url, {
|
|
329
333
|
params: {
|
|
330
334
|
selected_factory: factory,
|
|
331
335
|
},
|