@riocrypto/common-server 1.0.1552 → 1.0.1554

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.
@@ -60,7 +60,7 @@ class SecretManagerClient {
60
60
  if (this.env === common_1.RioEnv.Development) {
61
61
  file = "dev-secrets";
62
62
  }
63
- else if (this.env === common_1.RioEnv.Sandbox) {
63
+ else if (this.env === common_1.RioEnv.Sandbox || this.env === common_1.RioEnv.Local) {
64
64
  file = "sandbox-secrets";
65
65
  }
66
66
  else if (this.env === common_1.RioEnv.Staging) {
@@ -21,7 +21,7 @@ const apiKey_1 = require("../services/apiKey");
21
21
  const secret_manager_client_1 = require("../clients/secret-manager-client");
22
22
  const admin_auth_1 = require("../models/admin-auth");
23
23
  const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(void 0, void 0, void 0, function* () {
24
- var _a, _b, _c, _d, _e, _f, _g;
24
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
25
25
  if (authorizationTypes.includes(common_1.AuthorizationType.Cluster)) {
26
26
  let apiKey = req.header("x-cluster-api-key");
27
27
  const CLUSTER_API_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("CLUSTER_API_KEY");
@@ -110,7 +110,8 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
110
110
  }
111
111
  else {
112
112
  if (((_e = (_d = user.onboarding) === null || _d === void 0 ? void 0 : _d.MX) === null || _e === void 0 ? void 0 : _e.status) === common_1.OnboardingStatus.Approved ||
113
- ((_g = (_f = user.onboarding) === null || _f === void 0 ? void 0 : _f.PE) === null || _g === void 0 ? void 0 : _g.status) === common_1.OnboardingStatus.Approved) {
113
+ ((_g = (_f = user.onboarding) === null || _f === void 0 ? void 0 : _f.PE) === null || _g === void 0 ? void 0 : _g.status) === common_1.OnboardingStatus.Approved ||
114
+ ((_j = (_h = user.onboarding) === null || _h === void 0 ? void 0 : _h.US) === null || _j === void 0 ? void 0 : _j.status) === common_1.OnboardingStatus.Approved) {
114
115
  req.user = user;
115
116
  }
116
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1552",
3
+ "version": "1.0.1554",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/storage": "^6.9.5",
29
29
  "@google-cloud/vision": "^4.0.2",
30
30
  "@hyperdx/node-opentelemetry": "^0.4.2",
31
- "@riocrypto/common": "^1.0.1382",
31
+ "@riocrypto/common": "^1.0.1389",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.6.0",
34
34
  "ccxt": "^3.0.30",