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

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

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