Updates the Instructor.
URL : /api/instructors/:id
URL Parameters : id=[long]
Method : PUT
Sample Request Body (PermanentInstructor)
{
"phoneNumber": "+905055557556",
"name": "updatePI1",
"address": "updatePI1Address",
"fixedSalary": 7975.22
}
Sample Request Body (VisitingResearcher)
{
"phoneNumber": "+905055557555",
"name": "updateVS2",
"address": "updateVS2Address",
"hourlySalary": 66.43
}
Code : 204 NO CONTENT
Code : 400 BAD REQUEST
Sample Response Body :
{
"success": false,
"message": "An invalid entity type error has occurred.",
"errors": [
"The type of the submitted model is not of type 'VisitingResearcher'."
]
}
Code : 404 NOT FOUND
Sample Response Body :
{
"success": false,
"message": "No Records Found.",
"errors": [
"PermanentInstructor not found for parameters {id='2'}."
]
}
Code : 409 CONFLICT
Sample Response Body :
{
"success": false,
"message": "A unique constraint error has occurred.",
"errors": [
"'phoneNumber' must be unique. {rejectedValue: +905055557555}"
]
}