addSlotMapping method
- required String token,
- required CourseToSlot mapping,
override
Pushes a new mapping
to the server.
Implementation
@override
Future<CourseToSlot> addSlotMapping({required String token, required CourseToSlot mapping}) async {
log('Pushing slot mapping to server: $mapping');
final json = mapping.toJson()..remove('id');
final response = await api.callFunction(
function: 'local_lbplanner_slots_add_slot_filter',
body: json,
token: token,
);
response.assertJson();
return CourseToSlot.fromJson(response.asJson);
}