@ichaingo/request 1.4.18 → 1.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -113,7 +113,7 @@ function ResponseInterceptor(response) {
|
|
|
113
113
|
if (response.status === 401) {
|
|
114
114
|
TokenManager.removeAllToken();
|
|
115
115
|
const locale = ((_a = config == null ? void 0 : config.headers) == null ? void 0 : _a["Accept-Language"]) || "en";
|
|
116
|
-
window.location.href = `${process.env.
|
|
116
|
+
window.location.href = `${process.env.NEXT_PUBLIC_BASE_URL}/${locale}/login`;
|
|
117
117
|
return response;
|
|
118
118
|
}
|
|
119
119
|
if (response.status === 200) {
|
|
@@ -162,7 +162,7 @@ function ResponseInterceptor(response) {
|
|
|
162
162
|
}
|
|
163
163
|
let refreshPromise = null;
|
|
164
164
|
const axiosInstance$1 = axios.create({
|
|
165
|
-
baseURL: process.env.
|
|
165
|
+
baseURL: process.env.NEXT_PUBLIC_BASE_URL,
|
|
166
166
|
timeout: 1e4,
|
|
167
167
|
withCredentials: true,
|
|
168
168
|
// Always include credentials by default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichaingo/request",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"js-cookie": "3.0.5",
|
|
23
23
|
"next": "^15.4.5",
|
|
24
24
|
"qs": "6.14.0",
|
|
25
|
-
"@ichaingo/
|
|
26
|
-
"@ichaingo/
|
|
25
|
+
"@ichaingo/logger": "1.4.20",
|
|
26
|
+
"@ichaingo/token": "1.4.20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/js-cookie": "^3.0.6",
|