Merge remote-tracking branch 'upstream/develop' into fix/remove-double-login-protection
This commit is contained in:
commit
5ea1b15e9e
7 files changed
+33
-87
No files matched your search
@@ -2,7 +2,6 @@ const logger = require("../utils/logger");
|
||||
const { errorMessages } = require("../utils/messages");
|
||||
|
||||
const handleErrors = (error, req, res, next) => {
|
||||
console.log(error);
|
||||
const status = error.status || 500;
|
||||
const message = error.message || errorMessages.FRIENDLY_ERROR;
|
||||
const service = error.service || errorMessages.UNKNOWN_SERVICE;
|
||||
|
||||
@@ -31,7 +31,6 @@ const verifyOwnership = (Model, paramName) => {
|
||||
|
||||
// If the userID does not match the document's userID, return a 403 error
|
||||
if (userId.toString() !== doc.userId.toString()) {
|
||||
console.log(userId.toString(), doc.userId.toString());
|
||||
const error = new Error(errorMessages.VERIFY_OWNER_UNAUTHORIZED);
|
||||
error.status = 403;
|
||||
throw error;
|
||||
|
||||
Reference in new issue
Block a user