various fixes

This commit is contained in:
MathMan05 2024-08-16 15:10:12 -05:00
parent 4299e138fa
commit 1eea6cc005
9 changed files with 15 additions and 19 deletions

View file

@ -200,8 +200,8 @@ async function login(username, password, captcha) {
};
try {
const info = JSON.parse(localStorage.getItem("instanceinfo"));
const api = info.login;
return await fetch(api + '/auth/login', options).then(response => response.json())
const api = info.login + (info.login.startsWith("/") ? "/" : "");
return await fetch(api + 'auth/login', options).then(response => response.json())
.then((response) => {
console.log(response, response.message);
if ("Invalid Form Body" === response.message) {