Added delete cascade for Montiors. Alerts and Checks now also deleted

This commit is contained in:
Alex Holliday committed 2024-06-17 12:08:41 -07:00
1 parent 86d9389abc
commit 6801d066a1
4 files changed
+45 -14

No files matched your search

+1 -1
View File
@@ -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;