mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Store server string in Account model after removing path
This commit is contained in:
parent
5b0874f14f
commit
db5366b607
@ -94,11 +94,11 @@ extension WriteFreelyModel {
|
||||
serverString = serverString.replacingOccurrences(of: insecureProtocolPrefix, with: secureProtocolPrefix)
|
||||
}
|
||||
isLoggingIn = true
|
||||
account.server = serverString
|
||||
var serverURL = URL(string: serverString)!
|
||||
if !serverURL.path.isEmpty {
|
||||
serverURL.deleteLastPathComponent()
|
||||
}
|
||||
account.server = serverURL.absoluteString
|
||||
client = WFClient(for: serverURL)
|
||||
client?.login(username: username, password: password, completion: loginHandler)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user