@riocrypto/common 1.0.467 → 1.0.468

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.
@@ -50,10 +50,13 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
50
50
  }
51
51
  }
52
52
  if (authorizationTypes.includes(authorization_type_1.AuthorizationType.Admin)) {
53
+ console.log("ollie");
53
54
  if ((_f = req.cookies) === null || _f === void 0 ? void 0 : _f.adminJwt) {
54
55
  try {
55
56
  const payload = jsonwebtoken_1.default.verify(req.cookies.adminJwt, process.env.JWT_KEY_ADMIN);
57
+ console.log("ollie2");
56
58
  req.currentAdminAuth = payload;
59
+ console.log(req.currentAdminAuth);
57
60
  }
58
61
  catch (err) { }
59
62
  }
@@ -170,7 +173,9 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
170
173
  console.log(req.currentAuth);
171
174
  if (req.currentAdminAuth &&
172
175
  authorizationTypes.includes(authorization_type_1.AuthorizationType.Admin)) {
176
+ console.log("skipping");
173
177
  next();
178
+ return;
174
179
  }
175
180
  if (missingKYC) {
176
181
  throw new missing_kyc_approval_error_1.MissingKYCApprovalError();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.467",
3
+ "version": "1.0.468",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",