@riocrypto/common-server 1.0.684 → 1.0.686
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,13 +141,11 @@ 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");
|
|
145
144
|
const User = yield (0, user_1.buildUser)(mongoose);
|
|
146
145
|
user = yield User.findOne({
|
|
147
146
|
authIds: { $in: [req.currentAuth.id] },
|
|
148
147
|
attributes: { $ne: common_1.UserAttribute.deleted },
|
|
149
148
|
});
|
|
150
|
-
console.log("user", user);
|
|
151
149
|
if (!user) {
|
|
152
150
|
throw new Error();
|
|
153
151
|
}
|
|
@@ -163,7 +161,6 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
163
161
|
user = null;
|
|
164
162
|
}
|
|
165
163
|
if (user) {
|
|
166
|
-
console.log("setting user");
|
|
167
164
|
req.user = user;
|
|
168
165
|
}
|
|
169
166
|
}
|