Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination to metadata-service #471

Merged
merged 5 commits into from
Nov 6, 2023
Merged

Conversation

deasydoesit
Copy link
Contributor

This PR:

  • Updates GET /v2/hotspots?subnetwork=<subnetwork> to paginate.
    • Add &page=<page_number> to get results at page (e.g., /v2/hotspots?subnetwork=iot&page=100)
    • Results are sorted by created_at in <subnetwork>_hotspot_infos table
  • Adds GET /v2/hotspots/pagination-metadata?subnetwork=<subnetwork> to yield metadata about pagination (e.g., totalItems and totalPages). Done so that we can cache GET /v2/hotspots?subnetwork=<subnetwork> by not returning such data there

@deasydoesit deasydoesit removed the request for review from ChewingGlass November 3, 2023 19:30
@ChewingGlass ChewingGlass merged commit a02ee87 into develop Nov 6, 2023
32 of 33 checks passed
@ChewingGlass ChewingGlass deleted the feat/metadata-pagination branch November 6, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants