cancelReservation method
override
Cancels the reservation with reservationId
.
If force
is false
the user made the reservation will be asked for confirmation. When true
the reservation will be cancelled without confirmation.
Note: User associated with token
must be a supervisor of the slot.
Implementation
@override
Future<void> cancelReservation({required String token, required int reservationId, bool force = false}) async {
log('Cancelling reservation $reservationId');
await api.callFunction(
function: 'local_lbplanner_slots_unbook_reservation',
body: {
'reservationid': reservationId,
'nice': force,
},
token: token,
);
}