From f7c4e448b5888423427ed50e0c2953ec0b30ee76 Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Tue, 12 Nov 2024 12:26:21 +0100 Subject: [PATCH] fix Signed-off-by: Marino Faggiana --- Sources/NextcloudKit/NKCommon.swift | 6 ++++++ Sources/NextcloudKit/NKRequestOptions.swift | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/NextcloudKit/NKCommon.swift b/Sources/NextcloudKit/NKCommon.swift index f4cbe2c..87107a2 100644 --- a/Sources/NextcloudKit/NKCommon.swift +++ b/Sources/NextcloudKit/NKCommon.swift @@ -419,6 +419,12 @@ public class NKCommon: NSObject { if let paginateCount = options.paginateCount { headers.update(name: "X-NC-Paginate-Count", value: "\(paginateCount)") } + if let paginateOffset = options.paginateOffset { + headers.update(name: "X-NC-Paginate-Offset", value: "\(paginateOffset)") + } + if let paginateToken = options.paginateToken { + headers.update(name: "X-NC-Paginate-Token", value: paginateToken) + } } return headers } diff --git a/Sources/NextcloudKit/NKRequestOptions.swift b/Sources/NextcloudKit/NKRequestOptions.swift index bada5d6..4b586a8 100644 --- a/Sources/NextcloudKit/NKRequestOptions.swift +++ b/Sources/NextcloudKit/NKRequestOptions.swift @@ -18,7 +18,6 @@ public class NKRequestOptions: NSObject { var removeProperties: [NKProperties] var paginate: Bool var paginateToken: String? - var paginateTotal: Int? var paginateOffset: Int? var paginateCount: Int? var queue: DispatchQueue @@ -35,7 +34,6 @@ public class NKRequestOptions: NSObject { removeProperties: [NKProperties] = [], paginate: Bool = false, paginateToken: String? = nil, - paginateTotal: Int? = nil, paginateOffset: Int? = nil, paginateCount: Int? = nil, queue: DispatchQueue = .main) { @@ -52,7 +50,6 @@ public class NKRequestOptions: NSObject { self.removeProperties = removeProperties self.paginate = paginate self.paginateToken = paginateToken - self.paginateTotal = paginateTotal self.paginateOffset = paginateOffset self.paginateCount = paginateCount self.queue = queue