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

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

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