diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..a44bc18 Binary files /dev/null and b/favicon.ico differ diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..913a880 --- /dev/null +++ b/favicon.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + diff --git a/login.html b/login.html index 16b1aeb..8df89f8 100644 --- a/login.html +++ b/login.html @@ -8,7 +8,7 @@ - + @@ -33,4 +33,4 @@

You are logged in as

- \ No newline at end of file + diff --git a/loginchange.html b/loginchange.html index 4fd815a..74f4d1a 100644 --- a/loginchange.html +++ b/loginchange.html @@ -8,7 +8,7 @@ - + @@ -25,7 +25,7 @@


-
+



@@ -38,4 +38,4 @@
- \ No newline at end of file + diff --git a/loginchange.js b/loginchange.js index 561ca6f..6f792f0 100644 --- a/loginchange.js +++ b/loginchange.js @@ -35,7 +35,7 @@ form.addEventListener("submit", async function(event) { try { const userNotFound = await getUname(); - if (userNotFound !== `User ${uname}`) { + if (userNotFound.status == `fail`) { document.querySelector("#incorrect").innerHTML = `user ${uname} was not found` } else { loginChange() @@ -47,8 +47,8 @@ form.addEventListener("submit", async function(event) { async function getUname() { let response = await fetch(`/api/users/${uname}`); - responseText = await response.text(); - return responseText; + responseJson = await response.json(); + return responseJson; } async function loginChange() { @@ -59,5 +59,5 @@ const rawResponse = await fetch(`/api/users/change/${uname}/${pin}/${newUname}/$ body: "" }); document.querySelector("#incorrect").innerHTML = 'Login Changed!' -window.location.replace("http://127.0.0.1:5500/login.html") +window.location.replace("/login.html") } diff --git a/register.html b/register.html index ff79a17..c24d683 100644 --- a/register.html +++ b/register.html @@ -8,7 +8,7 @@ - +

Register:

@@ -48,4 +48,4 @@ - \ No newline at end of file + diff --git a/register.js b/register.js index 227f450..2fde99e 100644 --- a/register.js +++ b/register.js @@ -49,6 +49,6 @@ const rawResponse = await fetch(`/api/register/${uname.toString().toLowerCase()} body: "" }); document.querySelector("#taken").innerHTML = 'Registered!' -window.location.replace("http://127.0.0.1:5500/login.html") +window.location.replace("/login.html") }