22 lines
539 B
Dart
22 lines
539 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:http/http.dart';
|
|
import 'package:http/http.dart' as http;
|
|
|
|
import '../../mhslApi.dart';
|
|
import 'addCustomTimetableEventParams.dart';
|
|
|
|
class AddCustomTimetableEvent extends MhslApi<void> {
|
|
AddCustomTimetableEventParams params;
|
|
|
|
AddCustomTimetableEvent(this.params) : super('server/timetable/customEvents');
|
|
|
|
@override
|
|
void assemble(String raw) {}
|
|
|
|
@override
|
|
Future<Response>? request(Uri uri) {
|
|
String body = jsonEncode(params.toJson());
|
|
return http.post(uri, body: body);
|
|
}
|
|
} |