Closed sundargautam18 closed 2 years ago
router.route("/").get(protect, getNotes); router .route("/:id") .get(getNoteById) .delete(protect, DeleteNote) .put(protect, UpdateNote); router.route("/create").post(protect, CreateNote);
The problem with this code is, if I am authenticated I can delete or edit someone's else post if I know post id.
yes you're right thanks for the note
The problem with this code is, if I am authenticated I can delete or edit someone's else post if I know post id.