я не помню что добавил, но начал делать /users. TODO: Авторизация?

This commit is contained in:
neroduckale 2024-01-03 01:55:32 +05:00
parent 633491a349
commit 52e38d2ec4
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 399E73062E1A3667
6 changed files with 35 additions and 16 deletions

View file

@ -9,9 +9,10 @@ async function getUsers() {
if (response.ok === true) {
// получаем данные
const users = await response.json();
const rows = document.querySelector("tbody");
// добавляем полученные элементы в таблицу
users.forEach(user => rows.append(row(user)));
const table = document.querySelector("#users");
const count = document.querySelector("#count")
count.outerHTML = "1";
document.querySelector("#loading").destroy();
}
}
// Получение одного пользователя
@ -33,3 +34,4 @@ async function getUser(id) {
}
}
// Добавление пользователя
await getUsers();