diff options
author | curly <curly@infernal.garden> | 2024-07-17 15:56:43 -0600 |
---|---|---|
committer | curly <curly@infernal.garden> | 2024-07-17 15:56:43 -0600 |
commit | 1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d (patch) | |
tree | 26b2b3e2ee8010e97105a3d97883e1913408aa2e /src | |
parent | 87b71455a88941f0285985c0f0566c95d6a81b9f (diff) | |
download | poko_web-1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d.tar.gz poko_web-1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d.tar.bz2 poko_web-1b239cf6a10fda1b3dc5b1a2f4009219470d5e5d.zip |
registration keys
Diffstat (limited to 'src')
-rw-r--r-- | src/main.js | 6 | ||||
-rw-r--r-- | 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 @@ <input type="password" id="password" minlength="4" required> <label for="id">ID (OPTIONAL)<br>THIS IS WHAT YOU USE TO LOGIN. <bold>DO NOT LOSE IT!</bold> ONE WILL BE GENERATED IF NOT SPECIFIED.</label> <input type="text" id="id" minlength="4" maxlength="4" pattern="[0123456789abcedfABCDEF]{4}"> + <label for="key">REGISTRATION KEY</label> + <input type="text" id="key" minlength="1" required> <input type="submit" class="button formbutton" value="REGISTER"> </form> </div> |