simplify: dedupe boilerplate and remove dead code across all layers

This commit is contained in:
MineTec committed 2026-07-13 22:22:39 +02:00
1 parent 15791423ea
commit 398b147c76
69 files changed
+345 -651

No files matched your search

@@ -4,13 +4,11 @@ import 'timetable_get_students_response.dart';
class TimetableGetStudents extends MarianumConnectQuery {
TimetableGetStudents({super.dio});
Future<TimetableGetStudentsResponse> run() => guard(() async {
final response = await dio.get<List<dynamic>>(
endpoint('timetable/elements/students'),
);
final list = response.data!
.map((e) => McTimetableStudent.fromJson(e as Map<String, dynamic>))
.toList();
return TimetableGetStudentsResponse(result: list);
});
Future<TimetableGetStudentsResponse> run() async =>
TimetableGetStudentsResponse(
result: await getList(
'timetable/elements/students',
McTimetableStudent.fromJson,
),
);
}