updateRole method

Future<Map<String, dynamic>> updateRole(
  1. int hospitalId,
  2. int roleId,
  3. Map<String, dynamic> roleData
)

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,
  );
}