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

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

    return fetchWrapper(
        `/api/users/${userId}/deactivate`,
        { id: userId },
        "POST",
        { "X-XSRF-TOKEN": csrfToken }
    );
}
