mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
another relative url fix
This commit is contained in:
parent
fc68493958
commit
6282d5d2ac
@ -31,14 +31,14 @@ const API = (() => {
|
||||
headers: { 'x-access-token': module.token() }
|
||||
});
|
||||
} catch (err) {
|
||||
window.location.replace(`../login?redirect=${encodeURIComponent(window.location.pathname)}`);
|
||||
window.location.href = `../login?redirect=${encodeURIComponent(window.location.pathname)}`;
|
||||
}
|
||||
}
|
||||
|
||||
module.logout = () => {
|
||||
localStorage.removeItem('token');
|
||||
Cookies.remove('x-access-token');
|
||||
window.location.replace(`../login`);
|
||||
window.location.href = '../login';
|
||||
}
|
||||
|
||||
module.goToPlayer = () => {
|
||||
|
||||
@ -1412,7 +1412,7 @@ function logout(){
|
||||
localStorage.removeItem('token');
|
||||
Cookies.remove('x-access-token');
|
||||
MSTREAMAPI.updateCurrentServer("", "", "");
|
||||
window.location.replace(`login`);
|
||||
window.location.href = 'login';
|
||||
}
|
||||
|
||||
// Modals
|
||||
@ -1472,7 +1472,7 @@ function testIt() {
|
||||
|
||||
MSTREAMAPI.ping((response, error) => {
|
||||
if (error) {
|
||||
window.location.replace(`login`);
|
||||
window.location.href = 'login';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ async function checkToken() {
|
||||
headers: { 'x-access-token': localStorage.getItem('token') }
|
||||
});
|
||||
|
||||
window.location.replace(`../`);
|
||||
window.location.href = '../';
|
||||
} catch (err) {
|
||||
// localStorage.removeItem('token');
|
||||
}
|
||||
@ -19,7 +19,7 @@ async function checkToken() {
|
||||
|
||||
checkToken();
|
||||
|
||||
document.getElementById("login").addEventListener("submit", async e =>{
|
||||
document.getElementById("login").addEventListener("submit", async e => {
|
||||
e.preventDefault();
|
||||
|
||||
// Lock Button
|
||||
@ -40,7 +40,7 @@ document.getElementById("login").addEventListener("submit", async e =>{
|
||||
const queryString = window.location.search;
|
||||
const urlParams = new URLSearchParams(queryString);
|
||||
const goTo = urlParams.get('redirect') ? '..' + urlParams.get('redirect') : '../';
|
||||
window.location.replace(goTo);
|
||||
window.location.href = goTo;
|
||||
|
||||
iziToast.success({
|
||||
title: 'Login Success!',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user