Spaces:
Sleeping
Sleeping
Update api/routes/patients.py
Browse files- api/routes/patients.py +1 -1
api/routes/patients.py
CHANGED
|
@@ -123,7 +123,7 @@ async def delete_patient(
|
|
| 123 |
"""Delete a patient from the database"""
|
| 124 |
logger.info(f"Deleting patient {patient_id} by user {current_user.get('email')}")
|
| 125 |
|
| 126 |
-
if current_user.get('role') not in ['admin']:
|
| 127 |
logger.warning(f"Unauthorized delete attempt by {current_user.get('email')}")
|
| 128 |
raise HTTPException(
|
| 129 |
status_code=status.HTTP_403_FORBIDDEN,
|
|
|
|
| 123 |
"""Delete a patient from the database"""
|
| 124 |
logger.info(f"Deleting patient {patient_id} by user {current_user.get('email')}")
|
| 125 |
|
| 126 |
+
if current_user.get('role') not in ['admin', 'doctor']:
|
| 127 |
logger.warning(f"Unauthorized delete attempt by {current_user.get('email')}")
|
| 128 |
raise HTTPException(
|
| 129 |
status_code=status.HTTP_403_FORBIDDEN,
|