- updated zustand and react libraries;
- added 'put in draft' btn;
This commit is contained in:
@@ -9,12 +9,12 @@ const API_BASE_URL = process.env.REACT_APP_API_EXECUTION_ADDRESS;
|
||||
export default class AuthenticationService {
|
||||
|
||||
static wasLoggedIn = () => {
|
||||
const token = storeGet.main.getToken();
|
||||
const token = storeGet('getToken');
|
||||
return token ?? false;
|
||||
};
|
||||
|
||||
static isExpired = () => {
|
||||
const token = storeGet.main.getToken();
|
||||
const token = storeGet('getToken');
|
||||
|
||||
if (!token) {
|
||||
return false;
|
||||
@@ -36,7 +36,7 @@ export default class AuthenticationService {
|
||||
};
|
||||
|
||||
static isLoggedIn = () => {
|
||||
const token = storeGet.main.getToken();
|
||||
const token = storeGet('getToken');
|
||||
|
||||
if (!token) {
|
||||
return false;
|
||||
|
||||
@@ -7,7 +7,7 @@ export class NetworkService {
|
||||
if (status === 500) {
|
||||
logMsgWithSentry(endpoint, status, resp);
|
||||
} else if (status === 403) {
|
||||
storeSet.main.token('');
|
||||
storeSet('token', '');
|
||||
const { pathname } = window.location;
|
||||
if (!['/login', '/registration', '/loginadmin', '/reset-password-admin', '/confidi', '/reset-password'].includes(pathname)) {
|
||||
window.location.replace('/login');
|
||||
@@ -40,7 +40,7 @@ export class NetworkService {
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer ' + storeGet.main.getToken(),
|
||||
'Authorization': 'Bearer ' + storeGet('getToken'),
|
||||
},
|
||||
body: JSON.stringify(body)
|
||||
})
|
||||
@@ -84,7 +84,7 @@ export class NetworkService {
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
//'Content-Type': 'multipart/form-data',
|
||||
'Authorization': 'Bearer ' + storeGet.main.getToken(),
|
||||
'Authorization': 'Bearer ' + storeGet('getToken'),
|
||||
},
|
||||
body: body
|
||||
})
|
||||
@@ -128,7 +128,7 @@ export class NetworkService {
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer ' + storeGet.main.getToken(),
|
||||
'Authorization': 'Bearer ' + storeGet('getToken'),
|
||||
},
|
||||
body: JSON.stringify(body)
|
||||
})
|
||||
@@ -214,7 +214,7 @@ export class NetworkService {
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer ' + storeGet.main.getToken(),
|
||||
'Authorization': 'Bearer ' + storeGet('getToken'),
|
||||
},
|
||||
body: JSON.stringify(body)
|
||||
})
|
||||
@@ -262,7 +262,7 @@ export class NetworkService {
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer ' + storeGet.main.getToken(),
|
||||
'Authorization': 'Bearer ' + storeGet('getToken'),
|
||||
},
|
||||
//signal: AbortSignal.timeout(5000)
|
||||
})
|
||||
@@ -309,7 +309,7 @@ export class NetworkService {
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer ' + storeGet.main.getToken(),
|
||||
'Authorization': 'Bearer ' + storeGet('getToken'),
|
||||
},
|
||||
})
|
||||
.then(async response => {
|
||||
@@ -346,7 +346,7 @@ export class NetworkService {
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer ' + storeGet.main.getToken(),
|
||||
'Authorization': 'Bearer ' + storeGet('getToken'),
|
||||
},
|
||||
body: JSON.stringify(body)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user