@kumori/aurora-backend-handler 1.1.37 → 1.1.38
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/backend-handler.ts +12 -7
- package/package.json +1 -1
package/backend-handler.ts
CHANGED
|
@@ -77,6 +77,7 @@ import {
|
|
|
77
77
|
Service,
|
|
78
78
|
Tenant,
|
|
79
79
|
tenantRole,
|
|
80
|
+
User,
|
|
80
81
|
UserData,
|
|
81
82
|
} from "@kumori/aurora-interfaces";
|
|
82
83
|
|
|
@@ -101,16 +102,20 @@ export class BackendHandler {
|
|
|
101
102
|
eventHelper = new EventHelper(globalEventHandler);
|
|
102
103
|
environment.apiServer.baseUrl = baseUrl;
|
|
103
104
|
environment.apiServer.apiVersion = apiVersion;
|
|
105
|
+
let cookieReady = false;
|
|
104
106
|
getUserHTTP().then(() => {
|
|
105
|
-
|
|
106
|
-
initializeGlobalWebSocketClient(token, "", "", data);
|
|
107
|
-
});
|
|
108
|
-
const loadedCb = (data: UserData) => {
|
|
109
|
-
updateUserComplete(data);
|
|
110
|
-
};
|
|
111
|
-
eventHelper.user.subscribe.loaded(loadedCb);
|
|
107
|
+
cookieReady = true;
|
|
112
108
|
this.changeRoute(route);
|
|
113
109
|
})
|
|
110
|
+
eventHelper.user.subscribe.load((data: UserData) => {
|
|
111
|
+
if(cookieReady){
|
|
112
|
+
initializeGlobalWebSocketClient(token, "", "", data);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const loadedCb = (data: UserData) => {
|
|
116
|
+
updateUserComplete(data);
|
|
117
|
+
};
|
|
118
|
+
eventHelper.user.subscribe.loaded(loadedCb);
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
/**
|