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

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

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