mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Remove path from server URL if it exists
This commit is contained in:
parent
609a33067b
commit
5b0874f14f
@ -95,7 +95,11 @@ extension WriteFreelyModel {
|
||||
}
|
||||
isLoggingIn = true
|
||||
account.server = serverString
|
||||
client = WFClient(for: URL(string: serverString)!)
|
||||
var serverURL = URL(string: serverString)!
|
||||
if !serverURL.path.isEmpty {
|
||||
serverURL.deleteLastPathComponent()
|
||||
}
|
||||
client = WFClient(for: serverURL)
|
||||
client?.login(username: username, password: password, completion: loginHandler)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user