import express from "express";
import {
	createAppointment,
	getAppointments,
	getAppointment,
	updateAppointment,
	deleteAppointment,
} from "../controllers/appointment.controller.js";

import jwtAuthMiddleware from "../middleware/auth.js";

const router = express.Router();

/* PUBLIC */

router.get("/getall", jwtAuthMiddleware, getAppointments);
router.post("/", createAppointment);

router.get("/:id", jwtAuthMiddleware, getAppointment);
router.patch("/:id", jwtAuthMiddleware, updateAppointment);
router.delete("/:id", jwtAuthMiddleware, deleteAppointment);

export default router;
