@riocrypto/common 1.0.972 → 1.0.974

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.
@@ -186,7 +186,11 @@ class RioAdminClient {
186
186
  }
187
187
  getUser(userId) {
188
188
  return __awaiter(this, void 0, void 0, function* () {
189
- const { data } = yield this.axios.get(`/api/users/${userId}`);
189
+ let url = "/api/users";
190
+ if (userId) {
191
+ url += `/${userId}`;
192
+ }
193
+ const { data } = yield this.axios.get(url);
190
194
  return data;
191
195
  });
192
196
  }
@@ -41,7 +41,7 @@ export declare class RioClient {
41
41
  updateRioSettings(update: RioSettingsUpdate): Promise<void>;
42
42
  confirmBankPayment(orderId: string, amountFiat?: number): Promise<any>;
43
43
  confirmBankPayout(orderId: string): Promise<any>;
44
- getUser(): Promise<User>;
44
+ getUser(userId?: string): Promise<User>;
45
45
  createUser(user: UserInput): Promise<User>;
46
46
  uploadProofOfAddress(id: string, formData: FormData): Promise<User>;
47
47
  getBankPayment(orderId: string): Promise<BankPayment>;
@@ -103,9 +103,13 @@ class RioClient {
103
103
  return data;
104
104
  });
105
105
  }
106
- getUser() {
106
+ getUser(userId) {
107
107
  return __awaiter(this, void 0, void 0, function* () {
108
- const { data } = yield this.axios.get("/api/users");
108
+ let url = "/api/users";
109
+ if (userId) {
110
+ url += `/${userId}`;
111
+ }
112
+ const { data } = yield this.axios.get(url);
109
113
  return data;
110
114
  });
111
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.972",
3
+ "version": "1.0.974",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",