HUGE REFACTOR / CLEANUP
if there is a issue it's probably something in here that was changed
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
/* xeslint-disable */
|
||||
//import decode from "jwt-decode";
|
||||
import jwt_decode from "jwt-decode";
|
||||
import initialize from "./initialize";
|
||||
import notifypoll from "./notifypoll";
|
||||
@@ -69,11 +67,11 @@ export function processLogin(authResponse, loggedInWithKnownPassword) {
|
||||
// );
|
||||
|
||||
//Get global settings
|
||||
let gsets = await window.$gz.api.get("global-biz-setting/client");
|
||||
const gsets = await window.$gz.api.get("global-biz-setting/client");
|
||||
if (gsets.error) {
|
||||
//In a form this would trigger a bunch of validation or error display code but for here and now:
|
||||
//convert error to human readable string for display and popup a notification to user
|
||||
let msg = window.$gz.api.apiErrorToHumanString(gsets.error);
|
||||
const msg = window.$gz.api.apiErrorToHumanString(gsets.error);
|
||||
window.$gz.eventBus.$emit("notify-error", msg);
|
||||
} else {
|
||||
//Check if overrides and use them here
|
||||
@@ -99,7 +97,6 @@ export function processLogout() {
|
||||
}
|
||||
|
||||
export function isLoggedIn() {
|
||||
//const token = getToken();
|
||||
return (
|
||||
!!window.$gz.store.state.apiToken &&
|
||||
!isTokenExpired(window.$gz.store.state.apiToken)
|
||||
|
||||
Reference in New Issue
Block a user