Fixed register bugs.

main
Luna 2021-07-22 08:10:35 -07:00
parent d3da1a1637
commit b5e9238659
1 changed files with 4 additions and 4 deletions

View File

@ -29,10 +29,10 @@ form.addEventListener("submit", async function (event) {
try { try {
const isTaken = await getUname(); const isTaken = await getUname();
if (isTaken.status === 'fail') { if (isTaken.status === "fail") {
document.querySelector("#errormessage").innerHTML = `${uname} is already taken.` register()
} else { } else {
loginChange() document.querySelector("#errormessage").innerHTML = `${uname} is already taken.`
} }
} catch { } catch {
document.querySelector("#errormessage").innerHTML = 'An Error has Occurred. Try again later.' document.querySelector("#errormessage").innerHTML = 'An Error has Occurred. Try again later.'
@ -55,6 +55,6 @@ async function register() {
body: "" body: ""
}); });
document.querySelector("#errormessage").innerHTML = 'Registered!' document.querySelector("#errormessage").innerHTML = 'Registered!'
//window.location.replace("/login.html") window.location.replace("/login.html")
} }