added todo

This commit is contained in:
srgooglo 2022-05-10 19:58:10 +02:00
parent b7837284a9
commit 50f6ca2c14

View File

@ -4,9 +4,13 @@ import { Bridge } from "linebridge/dist/client"
import { Session } from "models" import { Session } from "models"
export default class ApiExtension extends Extension { export default class ApiExtension extends Extension {
depends = ["SettingsExtension"]
constructor(app, main) { constructor(app, main) {
super(app, main) super(app, main)
//this.config = this.getServerOrigins()
this.apiBridge = this.createBridge() this.apiBridge = this.createBridge()
this.WSInterface = this.apiBridge.wsInterface this.WSInterface = this.apiBridge.wsInterface
this.WSInterface.request = this.WSRequest this.WSInterface.request = this.WSRequest
@ -15,6 +19,11 @@ export default class ApiExtension extends Extension {
this.WSInterface.mainSocketConnected = false this.WSInterface.mainSocketConnected = false
} }
getServerOrigins = () => {
// TODO: try to get origins from settings
// const storagedOrigins = window.app.settings.get("serverOrigins")
}
initializers = [ initializers = [
async () => { async () => {
this.WSSockets.main.on("authenticated", () => { this.WSSockets.main.on("authenticated", () => {