attach to content api

This commit is contained in:
srgooglo 2022-09-03 03:45:34 +02:00
parent 2000562659
commit 89a5f9ffae

View File

@ -101,7 +101,7 @@ class App extends React.Component {
app.eventBus.emit("forceToLogin") app.eventBus.emit("forceToLogin")
}, },
"forceToLogin": () => { "forceToLogin": () => {
window.app.setLocation("/main") window.app.setLocation("/login")
app.eventBus.emit("app.createLogin") app.eventBus.emit("app.createLogin")
}, },
"invalid_session": async (error) => { "invalid_session": async (error) => {
@ -325,7 +325,6 @@ class App extends React.Component {
locked: true, locked: true,
}) })
// and initialize it
await this.props.cores.ApiCore.namespaces["main"].initialize() await this.props.cores.ApiCore.namespaces["main"].initialize()
// now attach the auth server // now attach the auth server
@ -334,9 +333,14 @@ class App extends React.Component {
locked: true, locked: true,
}) })
// and initialize it
await this.props.cores.ApiCore.namespaces["auth"].initialize() await this.props.cores.ApiCore.namespaces["auth"].initialize()
// now attach the content server
await this.props.cores.ApiCore.connectBridge("content", {
origin: storedRemotes.contentApi ?? defaultRemotes.contentApi,
locked: true,
})
app.eventBus.emit("app.initialization.api_success") app.eventBus.emit("app.initialization.api_success")
} catch (error) { } catch (error) {
app.eventBus.emit("app.initialization.api_error", error) app.eventBus.emit("app.initialization.api_error", error)