@riocrypto/common 1.0.516 → 1.0.518

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.
@@ -28,13 +28,13 @@ class RioClient {
28
28
  }
29
29
  getBusinessUsers(brokerId) {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
- const { data } = yield this.axios.get(`/api/business/users?brokerId=${brokerId}`);
31
+ const { data } = yield this.axios.get(`/api/business/users${brokerId ? `?brokerId=${brokerId}` : ""}`);
32
32
  return data;
33
33
  });
34
34
  }
35
35
  signinAdmin(email, password) {
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
- const { data } = yield this.axios.post(`/api/admin/signin`, {
37
+ const { data } = yield this.axios.post(`/api/auth/admin/signin`, {
38
38
  email,
39
39
  password,
40
40
  });
@@ -79,7 +79,7 @@ class RioClient {
79
79
  }
80
80
  signoutAdmin() {
81
81
  return __awaiter(this, void 0, void 0, function* () {
82
- yield this.axios.post("/api/admin/auth/signout", {});
82
+ yield this.axios.post("/api/auth/admin/signout", {});
83
83
  });
84
84
  }
85
85
  getRioSettings() {
@@ -1,4 +1,4 @@
1
1
  import { AxiosInstance } from "axios";
2
2
  import { BusinessUser } from "../types/business-user";
3
3
  import { User } from "../types/user";
4
- export declare const getUserFromClientHelper: (client: AxiosInstance, includeDeleted?: boolean) => Promise<User | BusinessUser | null | undefined>;
4
+ export declare const getUserFromClientHelper: (client: AxiosInstance, includeDeleted?: boolean) => Promise<User | BusinessUser | null>;
@@ -33,7 +33,10 @@ const getUserFromClientHelper = (client, includeDeleted) => __awaiter(void 0, vo
33
33
  return user;
34
34
  }
35
35
  else {
36
- if ((_a = user === null || user === void 0 ? void 0 : user.attributes) === null || _a === void 0 ? void 0 : _a.includes(user_attribute_1.UserAttribute.deleted)) {
36
+ if (!((_a = user === null || user === void 0 ? void 0 : user.attributes) === null || _a === void 0 ? void 0 : _a.includes(user_attribute_1.UserAttribute.deleted))) {
37
+ return user;
38
+ }
39
+ else {
37
40
  return null;
38
41
  }
39
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.516",
3
+ "version": "1.0.518",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",