deleteUser method

  1. @override
Future<void> deleteUser(
  1. User user
)
override

Deletes the user from the server.

Implementation

@override
Future<void> deleteUser(User user) async {
  var response = await apiService.callFunction(
    function: "local_lbplanner_user_delete_user",
    token: userToken.lbPlannerApiToken,
    body: {
      "userid": user.id,
    },
  );

  if (response.isNotOk) {
    throw Exception("Failed to delete user");
  }
}