fix: indentation and quotation

This commit is contained in:
Marcell FÜLÖP 2023-02-20 21:47:52 +00:00
parent 23f71b184f
commit 08405e8c81
3 changed files with 9 additions and 10 deletions

View File

@ -142,7 +142,7 @@ export default {
version: () => version,
disableExternal: () => disableExternal,
disableUsedPercentage: () => disableUsedPercentage,
canLogout: () => (!noAuth && loginPage) || authMethod === "oidc"
canLogout: () => (!noAuth && loginPage) || authMethod === "oidc",
},
asyncComputed: {
usage: {

View File

@ -21,9 +21,9 @@ export function parseToken(token) {
}
export async function validateLogin() {
let jwt = localStorage.getItem("jwt")
let jwt = localStorage.getItem("jwt");
if (authMethod === 'oidc' && (!jwt || jwt === "null")) {
if (authMethod === "oidc" && (!jwt || jwt === "null")) {
jwt = cookie("auth");
}
@ -48,7 +48,6 @@ export async function login(username, password, recaptcha) {
});
const body = await res.text();
if (res.status === 200) {
parseToken(body);
} else {
@ -69,7 +68,7 @@ export async function renew(jwt) {
if (res.status === 200) {
parseToken(body);
} else {
if (authMethod === 'oidc') {
if (authMethod === "oidc") {
clearLoginState();
document.location.replace(document.location.pathname);
}

View File

@ -102,7 +102,7 @@ export default {
event.preventDefault();
event.stopPropagation();
if (authMethod === 'oidc') {
if (authMethod === "oidc") {
return document.location.reload();
}