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

Fix Always Passing Date Parameters to Backend #761

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

coreyogburn
Copy link
Contributor

The old approach took advantage of the fact that undefined properties, when converted to JSON, are left out. The updated approach always specified the beginDate and endDate fields, if no value was entered by the user an empty string was used and this threw a 400 from the backend because they don't parse as a valid date. The new approach conditionally adds them if the user set their values.

Added a regression test.

The old approach took advantage of the fact that undefined properties, when converted to JSON, are left out. The updated approach always specified the `beginDate` and `endDate` fields, if no value was entered by the user an empty string was used and this threw a 400 from the backend because they don't parse as a valid date. The new approach conditionally adds them if the user set their values.

Added a regression test.
@coreyogburn coreyogburn merged commit ae8e4d8 into 2.4/dev Mar 3, 2025
3 checks passed
@coreyogburn coreyogburn deleted the cogburn/fix-pcap branch March 3, 2025 22:03
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants