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

export default async function createEvent(name, description, start, end) {
    const csrfToken = await getXSRFToken();

    return fetchWrapper(
        "/api/events/create",
        {name, description, start, end},
        "POST",
        {"X-XSRF-TOKEN": csrfToken}
    );
}

