@riocrypto/common 1.0.470 → 1.0.471

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,13 +50,10 @@ 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");
54
53
  if ((_f = req.cookies) === null || _f === void 0 ? void 0 : _f.adminJwt) {
55
54
  try {
56
55
  const payload = jsonwebtoken_1.default.verify(req.cookies.adminJwt, process.env.JWT_KEY_ADMIN);
57
- console.log("ollie2");
58
56
  req.currentAdminAuth = payload;
59
- console.log(req.currentAdminAuth);
60
57
  }
61
58
  catch (err) { }
62
59
  }
@@ -163,21 +160,14 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
163
160
  req.user = user;
164
161
  }
165
162
  }
166
- console.log(req.currentAdminAuth);
167
- console.log(req.currentAuth);
168
- console.log(req.user);
169
- console.log(req.partner);
170
163
  if (
171
164
  // if no auth
172
165
  (!req.currentAdminAuth && !req.currentAuth && !req.user && !req.partner) ||
173
166
  (!req.currentAuth &&
174
167
  !authorizationTypes.includes(authorization_type_1.AuthorizationType.Auth) &&
175
168
  !req.user)) {
176
- console.log("no auth");
177
- console.log(req.currentAuth);
178
169
  if (req.currentAdminAuth &&
179
170
  authorizationTypes.includes(authorization_type_1.AuthorizationType.Admin)) {
180
- console.log("skipping");
181
171
  next();
182
172
  return;
183
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.470",
3
+ "version": "1.0.471",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",