Started update user route

This commit is contained in:
Alex Holliday committed 2024-05-27 11:57:25 -07:00
1 parent 5fa73a1f17
commit d84a0f9c87
7 files changed
+125 -46

No files matched your search

+1
View File
@@ -19,6 +19,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");
const error = new Error("Unauthorized access");
error.status = 403;
throw error;