Default API to M5Max48:3002; preserve portal_config on session expiry
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Portal Development Environment
|
# Portal Development Environment
|
||||||
VITE_APP_TITLE=Momentry Portal (Development)
|
VITE_APP_TITLE=Momentry Portal (Development)
|
||||||
VITE_API_BASE_URL=http://127.0.0.1:3002
|
VITE_API_BASE_URL=http://192.168.110.201:3002
|
||||||
VITE_API_KEY=muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69
|
VITE_API_KEY=muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ function isTauri(): boolean {
|
|||||||
function handleSessionExpired() {
|
function handleSessionExpired() {
|
||||||
console.warn("Session expired or connection error, redirecting to login...");
|
console.warn("Session expired or connection error, redirecting to login...");
|
||||||
localStorage.removeItem('momentry_user');
|
localStorage.removeItem('momentry_user');
|
||||||
localStorage.removeItem('portal_config');
|
|
||||||
localStorage.removeItem('momentry_api_key');
|
localStorage.removeItem('momentry_api_key');
|
||||||
if (window.location.pathname !== '/login') {
|
if (window.location.pathname !== '/login') {
|
||||||
window.location.href = '/login';
|
window.location.href = '/login';
|
||||||
|
|||||||
Reference in New Issue
Block a user