add blocks

This commit is contained in:
2025-12-17 10:14:13 +02:00
parent 18a31be0b1
commit d78a6bedd5
54 changed files with 2755 additions and 10 deletions

View File

@@ -0,0 +1,16 @@
async function UserReg() {
const u = reg_user.value,
p = reg_pass.value;
const r = await fetch("/api/users/register", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ username: u, password: p })
});
if (!r.ok) return alert("Ошибка");
alert("ok");
reg_user.value = "",
reg_pass.value = "";
};
btn_reg.onclick = UserReg;