Simplify Logic
This commit is contained in:
Родитель
bf1e98be5c
Коммит
ee2a151d01
|
@ -1,3 +1,8 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import VCCrypto
|
||||
|
||||
public struct VCSDKConfiguration: VCSDKConfigurable {
|
||||
|
|
|
@ -24,11 +24,8 @@ class FetchDIDDocumentOperation: InternalNetworkOperation {
|
|||
throw NetworkingError.invalidUrl(withUrl: VCSDKConfiguration.sharedInstance.discoveryUrl)
|
||||
}
|
||||
|
||||
if urlComponents.path.last == "/" {
|
||||
urlComponents.path = urlComponents.path + identifier
|
||||
} else {
|
||||
urlComponents.path = urlComponents.path + "/" + identifier
|
||||
}
|
||||
let pathSuffix = urlComponents.path.last == "/" ? identifier : "/" + identifier
|
||||
urlComponents.path = urlComponents.path + pathSuffix
|
||||
|
||||
guard let url = urlComponents.url else {
|
||||
throw NetworkingError.invalidUrl(withUrl: urlComponents.string ?? discoveryUrl)
|
||||
|
|
Загрузка…
Ссылка в новой задаче