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

export default async function updateUser(name, lastname, phone) {
    const csrfToken = await getXSRFToken();

    return fetchWrapper(
        "/api/users/update",
        { name, lastname, phone },
        "POST",
        { "X-XSRF-TOKEN": csrfToken }
    );
}
