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

Fixed pagination error in REST API's #2952

Merged
merged 9 commits into from Jan 11, 2023

Conversation

koolgax99
Copy link
Contributor

@koolgax99 koolgax99 commented Jul 5, 2022

Description

  • Before, the new_page and prev_page field in the inputs API consisted links of /api/workflows. Now it is changed to /api/inputs.
  • The offset param was set to NA50 in the next_page if it wasn't defined in the start for runs, workflows and inputs API.

Before

  • For /api/inputs/ the response was: "next_page": "http://api.pecan.localhost:8000/api/workflows/NA50&limit=50"
  • Similarly, For /api/workflows/ the response was: "next_page": "http://api.pecan.localhost:8000/api/workflows/NA50&limit=50"
  • For /api/runs/ the response was: "next_page": "http://api.pecan.localhost:8000/api/runs/NA50&limit=50"

After

  • For /api/inputs/ the response now is "next_page": "http://api.pecan.localhost:8000/api/inputs/?offset=50&limit=50"
  • For /api/workflows/ the response now is "next_page": "http://api.pecan.localhost:8000/api/workflows/?offset=50&limit=50"
  • For /api/runs/ the response now is "next_page": "http://api.pecan.localhost:8000/api/runs/?offset=50&limit=50"

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@koolgax99 koolgax99 changed the title Fixed pagination error in inputs API Fixed pagination error in REST API's Jul 5, 2022
Copy link
Member

@dlebauer dlebauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks!

could you please update CHANGELOG.md and add it to the PR?

@koolgax99 koolgax99 requested a review from dlebauer July 7, 2022 12:19
@koolgax99
Copy link
Contributor Author

@dlebauer sir i have added the changelog!

@mdietze mdietze dismissed dlebauer’s stale review January 11, 2023 14:44

Requested change was made

@mdietze mdietze merged commit 3d98b5b into PecanProject:develop Jan 11, 2023
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.

None yet

6 participants