From 213a7e565d0e224fe1b37aa4353135382bff15a6 Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 21 Jul 2021 19:55:20 -0700 Subject: [PATCH] Misc changes and fixes. --- favicon.ico | Bin 0 -> 30494 bytes favicon.svg | 55 +++++++++++++++++++++++++++++++++++++++++++++++ login.html | 4 ++-- loginchange.html | 6 +++--- loginchange.js | 8 +++---- register.html | 4 ++-- register.js | 2 +- 7 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 favicon.ico create mode 100644 favicon.svg diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a44bc18482e0af41ae08091cdbff81f44e3c8811 GIT binary patch literal 30494 zcmeG_X>T0Im9J-(bC4X8m=VRXW=M}DV`vXR(xyh5g)GaIb^wNqBxnpmltp0>BLp}L zVgUj3MIQuW;ZO5Rve_$pZ)C^LVO!2=C(h->x$MMA?3|91SiH6G)zMv5T|EaWo57j| zJ$7|fy`x^edR5iadJW(}7hJy%c#XkZe*UkUjsak?Fq1u!Oc(JhNu1!;h%29(+HpW zXM}&b4bS}RZFu%mtMJ)>L-_Yq_#DB1titCB{&N++@Lvf3y$a9$&ni4m@V~3@0>P(O z;TFNoRe15KHF)vqHTWXIXV&0L1kbF&mkFL-gRc;L7U6Si@Ku7(uff*{zOV)_5j?jB zFF#MP4qtx(;nq5QgW$z=c!l7L>+ns2FRjD3zPt|K{tCiZ*Wo(^Ut5Ro61=nyufB}% z^$qwQ!8bPG`vk9Sz-t8G+<+etd}{-K_-%ymY`~8QzPkZGCU|uNenRlQ4S4dyzOxN~B>2NN z{E6V*ZTK_6AGhH>f?zi__Z z8Lf6(ugs0b?L1{^d~$B3U25&NyE-PRH@{}*+NIb=yX7K|WxFYQa=8tXZ8WKkw#!ns z%huW;+oDM=E2(vI&0cLmwng>wP$%5fwwYaMd*!4`snh)APK|r6#k^@HNc4OQZCb0Z z?`U9kS+duyq?;AicG+1jK(tf)I;#u5^ShJHI%n414IN8Svo}oYf%o-8`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..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") }