createShift method

Future<Map<String, dynamic>> createShift(
  1. int hospitalId,
  2. Map<String, dynamic> shiftData
)

Creates a new shift within a hospital.

hospitalId The ID of the hospital. shiftData A map containing the data for the new shift. Returns a Future<Map<String, dynamic>> containing the created shift's data.

Implementation

Future<Map<String, dynamic>> createShift(
    int hospitalId, Map<String, dynamic> shiftData) async {
  return await _makeRequest(
    '/api/hospitals/$hospitalId/shifts/',
    method: 'POST',
    body: shiftData,
  );
}