diff --git a/index.html b/index.html index 252ad8a..2b8f818 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + diff --git a/js/chat.js b/js/chat.js index 325a863..9755631 100644 --- a/js/chat.js +++ b/js/chat.js @@ -14,7 +14,7 @@ form.addEventListener("submit", async function (event) { //KINDA UNNECESSARY //CHECKS TO SEE IF THE PERSON IS LOGGED IN IN ORDER TO SEND A MESSAGE. - const response = await fetch(`api/token/${username}/`); + const response = await fetch(`../api/token/${username}/`); const matches = await response.json(); //YES THIS IS CONFUSING I KNOW. @@ -34,7 +34,7 @@ form.addEventListener("submit", async function (event) { async function sendMessage() { sendMessageInfo = { "name": username, "body": formMessage } - fetch('/api/message/send', { + fetch('../api/message/send', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/js/register.js b/js/register.js index c185443..ab3c101 100644 --- a/js/register.js +++ b/js/register.js @@ -38,7 +38,7 @@ form.addEventListener("submit", async function (event) { if (regRes.status === 'ok') { document.querySelector("#errormessage").innerHTML = 'Registered!' - window.location.replace("/login.html") + window.location.replace("../html/login.html") } else { document.querySelector("#errormessage").innerHTML = 'Failed to register. Try again later.' } diff --git a/js/updateinfo.js b/js/updateinfo.js index de6f42a..a8cd4e9 100644 --- a/js/updateinfo.js +++ b/js/updateinfo.js @@ -82,7 +82,7 @@ form.addEventListener("submit", async function (event) { if (updateResponse.status === 'ok') { document.querySelector("#errormessage").innerHTML = 'Login Changed!' - window.location.replace("/login.html") + window.location.replace("../html/login.html") } else { document.querySelector("#errormessage").innerHTML = 'Failed to update info. Try again later.' }