From 1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d Mon Sep 17 00:00:00 2001 From: curly Date: Wed, 17 Jul 2024 15:56:43 -0600 Subject: registration keys --- src/main.js | 6 +++--- src/register/index.html | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index 6f5b02a..e6d9264 100644 --- a/src/main.js +++ b/src/main.js @@ -51,11 +51,12 @@ async function register() { const username = document.getElementById("username").value; const password = document.getElementById("password").value; const id = document.getElementById("id").value; + const key = document.getElementById("key").value; const url = server + "/user/register/" - var body = {"name": username, "password": password, "id": id}; + var body = {"name": username, "password": password, "id": id, "key": key}; if (id == "") { - body = {"name": username, "password": password} + body = {"name": username, "password": password, "key": key} } const req = await xhttp_post(url, body); @@ -312,7 +313,6 @@ async function update_name_form() { window.onload = async function() { // if not on a user page if (window.location.pathname.indexOf("/user") == -1) { - console.log("NOT A USER PAGE") // and if logged in if (await is_logged_in()) { // move to the user index page diff --git a/src/register/index.html b/src/register/index.html index 38bcef7..8fe1774 100644 --- a/src/register/index.html +++ b/src/register/index.html @@ -30,6 +30,8 @@ + + -- cgit v1.2.3