Started update user route
This commit is contained in:
1 parent
5fa73a1f17
commit
d84a0f9c87
7 files changed
+125
-46
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user