import { postData } from "./client.js";

document.getElementById("deleteButton").onclick = async e => {
    e.preventDefault();
    const resultObject = await postData("/delete", { username: true, actor: true }, window.localStorage.getItem("token"));
    window.localStorage.removeItem("token");
    alert(resultObject.message);
    window.location.href = "/login.html"
};
