Skip to content

Commit 670524a

Browse files
cod
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
1 parent b4ba990 commit 670524a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Sources/NextcloudKit/NextcloudKit+API.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public extension NextcloudKit {
637637
fileNameLocalPath: String,
638638
sizeImage: Int,
639639
avatarSizeRounded: Int = 0,
640-
etag: String?,
640+
etagResource: String?,
641641
account: String,
642642
options: NKRequestOptions = NKRequestOptions(),
643643
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
@@ -649,9 +649,9 @@ public extension NextcloudKit {
649649
return options.queue.async { completion(account, nil, nil, nil, nil, .urlError) }
650650
}
651651

652-
if var etag = etag {
653-
etag = "\"" + etag + "\""
654-
headers.update(name: "If-None-Match", value: etag)
652+
if var etagResource = etagResource {
653+
etagResource = "\"" + etagResource + "\""
654+
headers.update(name: "If-None-Match", value: etagResource)
655655
}
656656

657657
nkSession.sessionData.request(url, method: .get, encoding: URLEncoding.default, headers: headers, interceptor: NKInterceptor(nkCommonInstance: nkCommonInstance)).validate(statusCode: 200..<300).onURLSessionTaskCreation { task in
@@ -749,7 +749,7 @@ public extension NextcloudKit {
749749
fileNameLocalPath: String,
750750
sizeImage: Int,
751751
avatarSizeRounded: Int = 0,
752-
etag: String?,
752+
etagResource: String?,
753753
account: String,
754754
options: NKRequestOptions = NKRequestOptions(),
755755
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in }
@@ -766,7 +766,7 @@ public extension NextcloudKit {
766766
fileNameLocalPath: fileNameLocalPath,
767767
sizeImage: sizeImage,
768768
avatarSizeRounded: avatarSizeRounded,
769-
etag: etag,
769+
etagResource: etagResource,
770770
account: account,
771771
options: options,
772772
taskHandler: taskHandler) { account, imageAvatar, imageOriginal, etag, responseData, error in

0 commit comments

Comments
 (0)