feat: add clinic role support to doctor profile access and update API endpoint for clinic owners
This commit is contained in:
@@ -106,6 +106,44 @@ Get doctor detail with clinics.
|
||||
|
||||
---
|
||||
|
||||
## GET `/api/v1/clinic/my-doctor/{doctorUuid}`
|
||||
|
||||
Get doctor detail for clinic owner — only doctors who are members of the authenticated clinic.
|
||||
|
||||
**Permission:** `ROLE_CLINIC`
|
||||
|
||||
### Path Parameters
|
||||
| Param | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `doctorUuid` | string (UUID) | Doctor UUID |
|
||||
|
||||
### Response `200`
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"data": {
|
||||
"uuid": "...",
|
||||
"title": "دکتر علی احمدی",
|
||||
"specialties": [...],
|
||||
"clinics": [{ "uuid": "...", "name": "کلینیک نور", "address": "...", "telephone": "..." }]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> ⚠️ **Double-nested:** Frontend extracts with `data?.data?.data`
|
||||
|
||||
> **Side note:** Returns only the authenticated clinic's data in the `clinics` array (not all clinics of the doctor).
|
||||
|
||||
### Errors
|
||||
| Code | HTTP | Description |
|
||||
|------|------|-------------|
|
||||
| `ERR_VALIDATION_002` | 404 | Clinic or doctor not found |
|
||||
| `ERR_AUTH_006` | 403 | Doctor is not a member of this clinic |
|
||||
|
||||
---
|
||||
|
||||
## GET `/api/v1/doctors`
|
||||
|
||||
List doctors with pagination and filters.
|
||||
|
||||
Reference in New Issue
Block a user