- updated zustand and react libraries;

- added 'put in draft' btn;
This commit is contained in:
Vitalii Kiiko
2025-04-10 12:36:19 +02:00
parent 44ba9036cb
commit 7dcf932819
90 changed files with 677 additions and 587 deletions

View File

@@ -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)
})