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