fix(mac): pass auth token to dashboard URL
This commit is contained in:
committed by
Peter Steinberger
parent
57b4865ab3
commit
400e901c9c
@@ -328,7 +328,11 @@ struct MenuContent: View {
|
|||||||
components.scheme = "http"
|
components.scheme = "http"
|
||||||
}
|
}
|
||||||
components.path = "/"
|
components.path = "/"
|
||||||
components.query = nil
|
if let token = config.token, !token.isEmpty {
|
||||||
|
components.queryItems = [URLQueryItem(name: "token", value: token)]
|
||||||
|
} else if let password = config.password, !password.isEmpty {
|
||||||
|
components.queryItems = [URLQueryItem(name: "password", value: password)]
|
||||||
|
}
|
||||||
guard let url = components.url else {
|
guard let url = components.url else {
|
||||||
throw NSError(domain: "Dashboard", code: 2, userInfo: [
|
throw NSError(domain: "Dashboard", code: 2, userInfo: [
|
||||||
NSLocalizedDescriptionKey: "Failed to build dashboard URL",
|
NSLocalizedDescriptionKey: "Failed to build dashboard URL",
|
||||||
|
|||||||
Reference in New Issue
Block a user