const get_all_users = async () => { const response = await fetch(routes.all_users(), { method: "POST", headers: { "Content-Type": "application/json", }, body: `{"token":"${localStorage.getItem("token")}"}`, }) .then((data) => data.json()) .then((jsondata) => jsondata) .catch((error) => { notification(`Ошибка на сервере: ${error}`, "error"); }); const alluserstablebody = document.querySelector("#alluserstablebody"); alluserstablebody.innerHTML = ""; for (const user of response) { alluserstablebody.innerHTML += `
${user.id}