From 69600746824dd532dfcc8452f0aedf81dfabf5cd Mon Sep 17 00:00:00 2001 From: wass3rw3rk <49894298+wass3rw3rk@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:00:08 -0600 Subject: [PATCH] comments --- api/pagination.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/pagination.go b/api/pagination.go index 6c0c12a19..e6fa087b5 100644 --- a/api/pagination.go +++ b/api/pagination.go @@ -30,6 +30,7 @@ func (p *Pagination) SetHeaderLink(c *gin.Context) { l := []string{} r := c.Request + // grab the current query params q := r.URL.Query() hl := HeaderLink{ @@ -48,6 +49,7 @@ func (p *Pagination) SetHeaderLink(c *gin.Context) { q.Del("page") q.Del("per_page") + // reset per config q.Set("per_page", strconv.Itoa(p.PerPage)) // drop first, prev on the first page