diff --git a/.github/workflows/cr.yaml b/.github/workflows/cr.yaml index 1082c09a..e9a9474f 100644 --- a/.github/workflows/cr.yaml +++ b/.github/workflows/cr.yaml @@ -21,8 +21,6 @@ jobs: - name: Install Helm uses: azure/setup-helm@v1 - with: - version: v3.4.0 - name: Run chart-releaser uses: helm/chart-releaser-action@v1.2.1 diff --git a/pkg/api/v1/handler.go b/pkg/api/v1/handler.go index 9c7b6c0c..a6514977 100644 --- a/pkg/api/v1/handler.go +++ b/pkg/api/v1/handler.go @@ -256,7 +256,7 @@ func buildPaginatiomn(req *http.Request) Pagination { } offset, err := strconv.Atoi(req.URL.Query().Get("offset")) if err != nil || offset < 1 { - offset = 20 + offset = 0 } direction := "ASC" if strings.ToLower(req.URL.Query().Get("direction")) == "desc" { diff --git a/pkg/sqlite3/store.go b/pkg/sqlite3/store.go index 6262c325..c76880cd 100644 --- a/pkg/sqlite3/store.go +++ b/pkg/sqlite3/store.go @@ -969,7 +969,7 @@ func generateFilterWhere(filter api.Filter, active []string) (string, []interfac } func generatePagination(pagination api.Pagination) string { - if pagination.Page == 0 { + if pagination.Page == 0 || pagination.Offset == 0 { return fmt.Sprintf( "ORDER BY %s %s", strings.Join(pagination.SortBy, ","),