- Cataloghi: pagine, schede, formato

This commit is contained in:
Surya Paolo
2024-11-19 19:19:14 +01:00
parent 90ed545070
commit 5cd9bd40f6
103 changed files with 3593115 additions and 1603 deletions

View File

@@ -180,16 +180,19 @@ export const Api = {
if (error.status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED) {
try {
console.log('Token Scaduto.')
const newAccessToken = await this.refreshToken();
if (newAccessToken) {
userStore.setAuth(newAccessToken, userStore.refreshToken);
if (!evitaloop)
if (!evitaloop) {
console.log('uso il RefreshToken...')
return resolve(this.SendReq(url, method, mydata, setAuthToken, true));
}
} else {
$router.push('/signin')
}
} catch (err2: any) {
console.error('err2', err2)
console.error('err2, Token Invalido', err2)
if (err2?.code === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
userStore.setServerCode(toolsext.ERR_AUTHENTICATION)
userStore.setAuth('', '')
@@ -241,7 +244,7 @@ export const Api = {
mydata: any,
setAuthToken = false,
evitaloop = false,
retryCount = 5,
retryCount = 3,
retryDelay = 5000
): Promise<Types.AxiosSuccess | Types.AxiosError> {
try {