simplify: dedupe boilerplate and remove dead code across all layers
This commit is contained in:
+2
-6
@@ -4,10 +4,6 @@ import 'timetable_get_schoolyear_response.dart';
|
||||
class TimetableGetSchoolyear extends MarianumConnectQuery {
|
||||
TimetableGetSchoolyear({super.dio});
|
||||
|
||||
Future<TimetableGetSchoolyearResponse> run() => guard(() async {
|
||||
final response = await dio.get<Map<String, dynamic>>(
|
||||
endpoint('timetable/schoolyear'),
|
||||
);
|
||||
return TimetableGetSchoolyearResponse.fromJson(response.data!);
|
||||
});
|
||||
Future<TimetableGetSchoolyearResponse> run() =>
|
||||
getObject('timetable/schoolyear', TimetableGetSchoolyearResponse.fromJson);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user