import 'dart:convert';

import 'package:http/http.dart';
import 'package:http/http.dart' as http;

import '../../mhslApi.dart';
import 'updateCustomTimetableEventParams.dart';

class UpdateCustomTimetableEvent extends MhslApi<void> {
  UpdateCustomTimetableEventParams params;

  UpdateCustomTimetableEvent(this.params) : super('server/timetable/customEvents');

  @override
  void assemble(String raw) {}

  @override
  Future<Response>? request(Uri uri) {
    return http.patch(uri, body: jsonEncode(params.toJson()));
  }
}