createRole method
Creates a new role within a hospital.
hospitalId
The ID of the hospital.
roleData
A map containing the data for the new role.
Returns a Future<Map<String, dynamic>>
containing the created role's data.
Implementation
Future<Map<String, dynamic>> createRole(
int hospitalId, Map<String, dynamic> roleData) async {
return await _makeRequest(
'/api/hospitals/$hospitalId/roles/',
method: 'POST',
body: roleData,
);
}