beer-network 1.1.1-alpha.18 → 1.1.1-alpha.19
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/api.js +3 -1
- package/package.json +1 -1
package/api.js
CHANGED
|
@@ -279,8 +279,10 @@ export default class Fetch {
|
|
|
279
279
|
if (typeof window === 'undefined') {
|
|
280
280
|
return result;
|
|
281
281
|
}
|
|
282
|
+
const redirect = window.location.href;
|
|
282
283
|
if (result?.code === '401') {
|
|
283
|
-
|
|
284
|
+
const link = (window?.authLogin || '/auth/login') + '?redirect=' + redirect;
|
|
285
|
+
setTimeout(() => window.location.replace(link), 500);
|
|
284
286
|
return result;
|
|
285
287
|
}
|
|
286
288
|
return result;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beer-network",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.1.1-alpha.
|
|
4
|
+
"version": "1.1.1-alpha.19",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"pub-w": "tsc && copy package.json .\\dist\\package.json && npm publish ./dist",
|
|
7
7
|
"pub-m": "tsc && cp package.json ./dist/package.json && npm publish ./dist"
|