Added delete cascade for Montiors. Alerts and Checks now also deleted
This commit is contained in:
1 parent
86d9389abc
commit
6801d066a1
4 files changed
+45
-14
No files matched your search
@@ -20,7 +20,7 @@ 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("boom");
|
||||
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