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

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

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

