Files
gg-backend/backend/src/routes/doctor.routes.js
T

30 lines
838 B
JavaScript
Raw Normal View History

2026-05-26 15:48:01 +05:30
import express from 'express';
2026-03-13 14:54:47 +05:30
import {
getAllDoctors,
createDoctor,
updateDoctor,
deleteDoctor,
getDoctorTimings,
getDoctorTimingById,
getDoctorByDoctorId,
getDoctorsByDepartmentId,
getFeaturedDoctors,
2026-05-26 15:48:01 +05:30
} from '../controllers/doctor.controller.js';
2026-03-13 14:54:47 +05:30
2026-05-26 15:48:01 +05:30
import jwtAuthMiddleware from '../middleware/auth.js';
2026-03-13 14:54:47 +05:30
const router = express.Router();
2026-05-26 15:48:01 +05:30
router.get('/getAll', getAllDoctors);
router.get('/search', getDoctorsByDepartmentId);
router.get('/getTimings', getDoctorTimings);
router.get('/getTimings/:doctorId', getDoctorTimingById);
router.get('/:doctorId', getDoctorByDoctorId);
router.get('/featured', getFeaturedDoctors);
2026-03-13 14:54:47 +05:30
2026-05-26 15:48:01 +05:30
router.post('/', jwtAuthMiddleware, createDoctor);
router.patch('/:doctorId/:action', jwtAuthMiddleware, updateDoctor);
router.delete('/:doctorId', jwtAuthMiddleware, deleteDoctor);
2026-03-13 14:54:47 +05:30
export default router;