diff --git a/anarres/gitlab.scm b/anarres/gitlab.scm index 227bdbe..03d6945 100644 --- a/anarres/gitlab.scm +++ b/anarres/gitlab.scm @@ -110,7 +110,10 @@ values strings or #f, in which case the parameter is skipped." (define* (get-paged client endpoint #:key (query '()) (post-proc identity)) (let ((query-params (ensure-per-page query "100"))) (define (get-pages accum next-page) - (let* ((body headers (api-call client http-get endpoint #:query (alist-cons 'page next-page query-params) #:post-proc post-proc #:return-headers? #t)) + (let* ((body headers (api-call client http-get endpoint + #:query (assoc-set! query-params 'page next-page) + #:post-proc post-proc + #:return-headers? #t)) (accum (append accum body)) (next-page (assoc-ref headers 'x-next-page))) (if (and (string? next-page) (> (string-length next-page) 0))