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

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

    return fetchWrapper(
        "/api/users/logout",
        null,
        "POST",
        { "X-XSRF-TOKEN": csrfToken }
    );
}
