support multiple servers

This commit is contained in:
Rasmus Krämer
2022-04-15 10:16:11 +02:00
parent 9a7b2e8172
commit 29fd29728a
8 changed files with 68 additions and 38 deletions
@@ -17,6 +17,11 @@ class ServerConnectionConfig: Object {
@Persisted var username: String
@Persisted var token: String
}
class ServerConnectionConfigActiveIndex: Object {
// This could overflow, but you really would have to try
@Persisted var index: Int?
}
func convertServerConnectionConfigToJSON(config: ServerConnectionConfig) -> Dictionary<String, Any> {
return Database.realmQueue.sync {