deleteFeedback method

  1. @override
Future<void> deleteFeedback(
  1. Feedback feedback
)
override

Deletes the given feedback.

Note: This is only available to UserCapability.moderator and UserCapability.dev users.

Implementation

@override
Future<void> deleteFeedback(Feedback feedback) async {
  final response = await apiService.callFunction(
    function: "local_lbplanner_feedback_delete_feedback",
    token: token.lbPlannerApiToken,
    body: {},
  );

  // TODO: replace with `response.failed` once #52 is merged
  if (response.isNotOk) {
    throw Exception("Failed to delete feedback: ${response.body}");
  }
}