@@ -5,12 +5,14 @@ import * as patientController from '../controllers/patient.js';
55const router = express . Router ( ) ;
66
77
8- router . get ( '/' , protect , authorize ( 'admin' , 'doctor' , 'receptionist' ) , patientController . getPatients ) ;
8+ router . get ( '/' , protect , authorize ( 'admin' , 'doctor' , 'receptionist' , 'billing ') , patientController . getPatients ) ;
99
10- router . post ( '/' , protect , authorize ( 'admin' , 'doctor' , 'receptionist' ) , patientController . createPatient ) ;
10+ router . get ( '/:id ' , protect , authorize ( 'admin' , 'doctor' , 'receptionist' , 'billing' ) , patientController . getPatientById ) ;
1111
12- router . put ( '/:id ' , protect , authorize ( 'admin' , 'doctor' , 'receptionist' ) , patientController . updatePatient ) ;
12+ router . post ( '/' , protect , authorize ( 'admin' , 'doctor' , 'receptionist' , 'billing' ) , patientController . createPatient ) ;
1313
14- router . delete ( '/:id' , protect , authorize ( 'admin' , 'receptionist' ) , patientController . deletePatient ) ;
14+ router . put ( '/:id' , protect , authorize ( 'admin' , 'doctor' , 'receptionist' , 'billing' ) , patientController . updatePatient ) ;
15+
16+ router . delete ( '/:id' , protect , authorize ( 'admin' ) , patientController . deletePatient ) ;
1517
1618export default router ;
0 commit comments