summaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
authorcurly <curly@infernal.garden>2024-07-17 15:56:43 -0600
committercurly <curly@infernal.garden>2024-07-17 15:56:43 -0600
commit1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d (patch)
tree26b2b3e2ee8010e97105a3d97883e1913408aa2e /src/main.js
parent87b71455a88941f0285985c0f0566c95d6a81b9f (diff)
downloadpoko_web-1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d.tar.gz
poko_web-1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d.tar.bz2
poko_web-1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d.zip
registration keys
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js6
1 files changed, 3 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