fix: add JWT middleware to private API routes

This commit is contained in:
Kailasdevdas
2026-04-08 16:44:41 +05:30
parent 9c44c66b22
commit fb298cb846
7 changed files with 21 additions and 17 deletions
+3 -3
View File
@@ -13,11 +13,11 @@ const router = express.Router();
/* PUBLIC */
router.get("/getall", getAppointments);
router.get("/getall", jwtAuthMiddleware, getAppointments);
router.post("/", createAppointment);
router.get("/:id", getAppointment);
router.patch("/:id", updateAppointment);
router.get("/:id", jwtAuthMiddleware, getAppointment);
router.patch("/:id", jwtAuthMiddleware, updateAppointment);
router.delete("/:id", jwtAuthMiddleware, deleteAppointment);
export default router;