Skip to content

feat: Implement actual pagination logic for array data #35

@AlAfiz

Description

@AlAfiz

Description

We previously added the ability to read page and limit query parameters. Now we need to actually slice the data array based on those parameters before sending it to the client.

Requirements

  • Update the endpoint that returns a list (e.g., token list or transaction history).
  • Calculate the startIndex and endIndex based on the requested page and limit.
  • Use the JavaScript .slice() method to return only the requested chunk of the array.
  • Include a totalCount in the JSON response so the frontend knows how many pages exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions