@riocrypto/common-server 1.0.683 → 1.0.684

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.
@@ -141,11 +141,13 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
141
141
  authorizationTypes.includes(common_1.AuthorizationType.UserOptional)) {
142
142
  let user;
143
143
  try {
144
+ console.log("Getting user");
144
145
  const User = yield (0, user_1.buildUser)(mongoose);
145
146
  user = yield User.findOne({
146
147
  authIds: { $in: [req.currentAuth.id] },
147
148
  attributes: { $ne: common_1.UserAttribute.deleted },
148
149
  });
150
+ console.log("user", user);
149
151
  if (!user) {
150
152
  throw new Error();
151
153
  }
@@ -161,6 +163,7 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
161
163
  user = null;
162
164
  }
163
165
  if (user) {
166
+ console.log("setting user");
164
167
  req.user = user;
165
168
  }
166
169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.683",
3
+ "version": "1.0.684",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",