import fetchWrapper from "../fetchWrapper.js";
import getXSRFToken from "../getXSRF.js";

export default async function deleteEvent(eventId) {
    const csrfToken = await getXSRFToken();

    return fetchWrapper(
        `/api/events/${eventId}`,
        {id: eventId},
        "DELETE",
        {"X-XSRF-TOKEN": csrfToken}
    );
}
