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

Forward params on pagination #422

Merged
merged 4 commits into from
Nov 27, 2023
Merged

Conversation

ralexmatthews
Copy link
Contributor

Description

There was an issue where sometimes when fetching the next page, we wouldn't have the original params sent along. So this stores the data used when fetching the next page in a new key on the EasyPostObject, _params, that is then added when fetching the next page.

Testing

I ran the test suite and it worked, with some modifications to make sure we can ignore the _params when comparing input to output.

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • 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 not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

@ralexmatthews ralexmatthews requested a review from a team November 16, 2023 20:10
test/helpers/utils.js Outdated Show resolved Hide resolved
Copy link
Member

@nwithan8 nwithan8 left a comment

Choose a reason for hiding this comment

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

Paired with Alex on this, can confirm logic seems sound, approach actually makes it a bit more future-proof and resilient while also cleaning up bad automagical stuff.

src/models/easypost_object.js Show resolved Hide resolved
@ralexmatthews ralexmatthews merged commit 4f6c442 into master Nov 27, 2023
6 checks passed
@ralexmatthews ralexmatthews deleted the forward-params-on-pagination branch November 27, 2023 15:09
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