This commit is contained in:
Samandar Turgunboyev
2026-01-26 13:48:45 +05:00
parent 105c384994
commit 7dfdba1c2a

View File

@@ -48,7 +48,6 @@ httpClient.interceptors.response.use(
if (!refToken) {
removeToken();
removeRefToken();
window.location.href = '/';
}
const { data } = await axios.post(
`${BASE_URL}api/v1/accounts/refresh/token/`,
@@ -59,7 +58,6 @@ httpClient.interceptors.response.use(
} catch {
removeToken();
removeRefToken();
window.location.href = '/';
}
} else if ((error as AxiosError)?.status === 401) {
try {
@@ -67,7 +65,6 @@ httpClient.interceptors.response.use(
if (!refToken) {
removeToken();
removeRefToken();
window.location.href = '/';
}
const { data } = await axios.post(
`${BASE_URL}api/v1/accounts/refresh/token/`,
@@ -78,7 +75,6 @@ httpClient.interceptors.response.use(
} catch {
removeToken();
removeRefToken();
window.location.href = '/';
}
}
return Promise.reject(error);