@riocrypto/common-server 1.0.692 → 1.0.694

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.
@@ -23,7 +23,6 @@ const secret_manager_client_1 = require("../clients/secret-manager-client");
23
23
  const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(void 0, void 0, void 0, function* () {
24
24
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
25
25
  const apiKey = req.header("x-api-key");
26
- console.log("x-api-key is ", apiKey);
27
26
  let missingKYC = false;
28
27
  if (authorizationTypes.includes(common_1.AuthorizationType.AdminAPI)) {
29
28
  let apiKey = req.header("x-api-key");
@@ -41,16 +40,13 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
41
40
  authorizationTypes.includes(common_1.AuthorizationType.UserOptional) ||
42
41
  authorizationTypes.includes(common_1.AuthorizationType.Broker)) {
43
42
  const apiKey = req.header("x-api-key");
44
- console.log("x-api-key is ", apiKey);
45
43
  if (apiKey) {
46
44
  try {
47
- console.log("x-api-key is ", apiKey);
48
45
  const hashedApiKey = yield apiKey_1.ApiKey.toHash(apiKey);
49
46
  const Auth = yield (0, auth_1.buildAuth)(mongoose);
50
47
  const auth = yield Auth.findOne({
51
48
  "apiKeys.value": hashedApiKey,
52
49
  });
53
- console.log(auth);
54
50
  if (auth) {
55
51
  const missing = [];
56
52
  if (!auth.password) {
@@ -64,7 +60,6 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
64
60
  phoneNumber: auth.phoneNumber,
65
61
  missing,
66
62
  };
67
- console.log(payload);
68
63
  req.currentAuth = payload;
69
64
  }
70
65
  }
@@ -100,7 +95,6 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
100
95
  throw new Error("Unable to get ADMIN_ACCESS_TOKEN_SECRET");
101
96
  }
102
97
  const payload = jsonwebtoken_1.default.verify(req.cookies.adminAccessToken, ADMIN_ACCESS_TOKEN_SECRET);
103
- console.log(payload);
104
98
  req.currentAdminAuth = payload;
105
99
  }
106
100
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.692",
3
+ "version": "1.0.694",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",