mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
attach to content api
This commit is contained in:
parent
2000562659
commit
89a5f9ffae
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user