getSupervisedSlots method

  1. @override
Future<List<Slot>> getSupervisedSlots(
  1. String tokrn
)
override

Fetches all slots supervised by the current user.

Implementation

@override
Future<List<Slot>> getSupervisedSlots(String tokrn) async {
  log('Fetching supervised slots');

  final response = await api.callFunction(
    function: 'local_lbplanner_slots_get_supervisor_slots',
    token: tokrn,
  );

  response.assertJson();

  return response.asList.map(Slot.fromJson).toList();
}