Fixed redirects
This commit is contained in:
parent
7da6266b94
commit
8ea1299220
4 changed files with 5 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="css/index.css">
|
||||
<link rel="icon" href="asssets/favicon.svg">
|
||||
<link rel="icon" href="assets/favicon.svg">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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.'
|
||||
}
|
||||
|
|
|
@ -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.'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue