updateUser method
Updates an existing user's data within a hospital.
hospitalId
The ID of the hospital.
userId
The ID of the user to update.
userData
A map containing the updated data for the user.
Returns a Future<Map<String, dynamic>>
containing the updated user's data.
Implementation
Future<Map<String, dynamic>> updateUser(
int hospitalId, int userId, Map<String, dynamic> userData) async {
return await _makeRequest(
'/api/hospitals/$hospitalId/users/$userId/',
method: 'PATCH',
body: userData,
);
}