Fix the incorrect server config being persisted

This commit is contained in:
ronaldheft
2022-08-26 20:20:26 -04:00
parent c1f803bdd0
commit eb7289c150
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -51,7 +51,8 @@ public class AbsDatabase: CAPPlugin {
config.token = token
Store.serverConfig = config
call.resolve(convertServerConnectionConfigToJSON(config: config))
let savedConfig = Store.serverConfig // Fetch the latest value
call.resolve(convertServerConnectionConfigToJSON(config: savedConfig!))
}
@objc func removeServerConnectionConfig(_ call: CAPPluginCall) {
let id = call.getString("serverConnectionConfigId", "")