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

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

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