mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-30 15:17:14 +02:00
Login is now working
This commit is contained in:
@@ -50,12 +50,23 @@ public class AbsDatabase: CAPPlugin {
|
||||
config.token = token
|
||||
|
||||
Store.serverConfig = config
|
||||
call.resolve(serverConnectionConfigToJSON(config: config))
|
||||
call.resolve(convertServerConnectionConfigToJSON(config: config))
|
||||
}
|
||||
}
|
||||
@objc func getDeviceData(_ call: CAPPluginCall) {
|
||||
Database.realmQueue.sync {
|
||||
call.resolve(serverConnectionConfigToJSON(config: Store.serverConfig))
|
||||
let configs = Database.getServerConnectionConfigs()
|
||||
let index = Database.getActiveServerConfigIndex()
|
||||
|
||||
call.resolve([
|
||||
"serverConnectionConfigs": configs.map { config in
|
||||
return convertServerConnectionConfigToJSON(config: config)
|
||||
},
|
||||
"lastServerConnectionConfigId": index < 0 ? -1 : configs[index].id,
|
||||
"currentLocalPlaybackSession": nil, // Luckily this isn't implemented yet
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user