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