import '../../../mhsl/custom_timetable_event/custom_timetable_event.dart';
import '../../marianumconnect_query.dart';

class TimetableCustomEventsAdd extends MarianumConnectQuery {
  TimetableCustomEventsAdd({super.dio});

  Future<void> run(CustomTimetableEvent event) => guard(() async {
    await dio.post<void>(
      endpoint('timetable/custom-events'),
      data: event.toJson(),
    );
  });
}
