mirror of
https://github.com/metabolist/metatext.git
synced 2025-05-10 11:44:43 +00:00
Add https check to accountSettings/editProfileURL (#134)
This commit is contained in:
parent
6abc8e20d6
commit
3808a04d87
1 changed files with 10 additions and 2 deletions
|
@ -224,10 +224,18 @@ public extension NavigationViewModel {
|
|||
|
||||
private extension NavigationViewModel {
|
||||
func accountSettingsURL(instanceURI: String) -> URL? {
|
||||
URL(string: "https://\(instanceURI)/auth/edit")
|
||||
if instanceURI.hasPrefix("https://") {
|
||||
return URL(string: "\(instanceURI)/auth/edit")
|
||||
} else {
|
||||
return URL(string: "https://\(instanceURI)/auth/edit")
|
||||
}
|
||||
}
|
||||
|
||||
func editProfileURL(instanceURI: String) -> URL? {
|
||||
URL(string: "https://\(instanceURI)/settings/profile")
|
||||
if instanceURI.hasPrefix("https://") {
|
||||
return URL(string: "\(instanceURI)/settings/profile")
|
||||
} else {
|
||||
return URL(string: "https://\(instanceURI)/settings/profile")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue