From 2621f9b7c9684077082bd28dc11ee81b5a10b9e0 Mon Sep 17 00:00:00 2001 From: Yauhen Shulitski Date: Mon, 22 May 2023 16:41:07 +0200 Subject: [PATCH] :p: Apply pagination workaround to GET requests only --- cmd/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils.go b/cmd/utils.go index 548db37..ddeaf8e 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -179,7 +179,7 @@ func makev4APIRequest(method string, url string, payload io.Reader, expectedStat // https://tiggee.freshdesk.com/support/tickets/72504 // As a workaround we will request one extra page before finishing // the loop over all pages - if resp.Meta.Pagination.PerPage == resp.Meta.Pagination.Count { + if method == "GET" && resp.Meta.Pagination.PerPage == resp.Meta.Pagination.Count { parsedURL, err := libURL.Parse(url) if err != nil { return nil, err