Retrieve a single medical specialty by its ID
Authorization header.validatorJWT - Validates JWT token (backend/middlewares/validatorJWT.ts)collectionErrors - Handles validation errors (backend/middlewares/collectionErrors.ts)backend/controllers/speciality.ts:72
1 - Retrieves specialty with ID 125 - Retrieves specialty with ID 25| Status Code | Description |
|---|---|
200 | Success - Returns the specialty object |
401 | Unauthorized - Invalid or missing JWT token |
404 | Not Found - Specialty with the given ID does not exist |
500 | Server Error - Database or internal error |
findByPk (find by primary key) method:
backend/controllers/speciality.ts:76-91
backend/models/speciality.ts:16-32
state query parameter.createdAt and updatedAt) automatically added by Sequelize