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

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

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