@riocrypto/common-server 1.0.682 → 1.0.683

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.
@@ -149,7 +149,10 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
149
149
  if (!user) {
150
150
  throw new Error();
151
151
  }
152
- if ((user === null || user === void 0 ? void 0 : user.kycStatus) !== common_1.KYCStatus.Passed) {
152
+ if ((user.type === common_1.UserType.Individual &&
153
+ (user === null || user === void 0 ? void 0 : user.kycStatus) !== common_1.KYCStatus.Passed) ||
154
+ (user.type === common_1.UserType.Business &&
155
+ (user === null || user === void 0 ? void 0 : user.kycStatus) !== common_1.KYCStatus.businessApproved)) {
153
156
  missingKYC = true;
154
157
  throw new Error();
155
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.682",
3
+ "version": "1.0.683",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",