26 lines
688 B
JavaScript
26 lines
688 B
JavaScript
|
|
import express from "express";
|
||
|
|
import {
|
||
|
|
getAllDoctors,
|
||
|
|
createDoctor,
|
||
|
|
updateDoctor,
|
||
|
|
deleteDoctor,
|
||
|
|
getDoctorTimings,
|
||
|
|
getDoctorTimingById,
|
||
|
|
getDoctorByDoctorId,
|
||
|
|
} from "../controllers/doctor.controller.js";
|
||
|
|
|
||
|
|
import jwtAuthMiddleware from "../middleware/auth.js";
|
||
|
|
|
||
|
|
const router = express.Router();
|
||
|
|
|
||
|
|
router.get("/getAll", getAllDoctors);
|
||
|
|
router.get("/:doctorId", getDoctorByDoctorId);
|
||
|
|
router.get("/getTimings", getDoctorTimings);
|
||
|
|
router.get("/getTimings/:doctorId", getDoctorTimingById);
|
||
|
|
|
||
|
|
router.post("/", jwtAuthMiddleware, createDoctor);
|
||
|
|
router.patch("/:doctorId", jwtAuthMiddleware, updateDoctor);
|
||
|
|
router.delete("/:doctorId", jwtAuthMiddleware, deleteDoctor);
|
||
|
|
|
||
|
|
export default router;
|