feat : add doctor & career api
This commit is contained in:
25
backend/src/routes/doctor.routes.js
Normal file
25
backend/src/routes/doctor.routes.js
Normal file
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user