fix urlencoded
Signed-off-by: marinofaggiana <marino.faggiana@nextcloud.com>
This commit is contained in:
Родитель
37c292ddad
Коммит
421eec92da
|
@ -123,10 +123,11 @@ extension NCCommunication {
|
|||
timeout: TimeInterval = 60,
|
||||
completion: @escaping (NCCSearchResult?, _ errorCode: Int, _ errorDescription: String) -> Void) -> DataRequest? {
|
||||
|
||||
guard var endpoint = "ocs/v2.php/search/providers/\(id)/search?format=json&term=\(term)".urlEncoded else {
|
||||
guard let term = term.urlEncoded else {
|
||||
completion(nil, NSURLErrorBadURL, NSLocalizedString("_invalid_url_", value: "Invalid server url", comment: ""))
|
||||
return nil
|
||||
}
|
||||
var endpoint = "ocs/v2.php/search/providers/\(id)/search?format=json&term=\(term)"
|
||||
if let limit = limit {
|
||||
endpoint += "&limit=\(limit)"
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче