Skip to content

Pagination and filtering #2

@ditschedev

Description

@ditschedev

It should be possible to filter and paginate data using query parameters.

  • filtering: use populate() function of mongoose.
  • pagination:
    • response should contain a _page property
      _page: {
          total: 200,
          pages: 20,
          page: 2,
          limit: 10,
          first: {
              page: 1,
              href: "http://api.example.dev/resource"
          },
          next: {
              page: 3,
              href: "http://api.example.dev/resource?page=3"
          },
          prev: {
              page: 1,
              href: "http://api.example.dev/resource"
          },
          last: {
              page: 20,
              href: "http://api.example.dev/resource?page=20"
          }
      }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions