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: delete null value in request body #2042

Merged
merged 2 commits into from
Aug 7, 2021

Conversation

Baoyuantop
Copy link
Contributor

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

In the optional InputNumber component of the entire project, when the user chooses not to fill in, the value of the field in the request body is null, which will cause a request error.

The correct approach is to delete all fields with null values in the request body.

Related issues

fix #2019

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@netlify
Copy link

netlify bot commented Aug 6, 2021

✔️ Deploy Preview for apisix-dashboard ready!

🔨 Explore the source changes: f6a67e1

🔍 Inspect the deploy log: https://app.netlify.com/sites/apisix-dashboard/deploys/610e38eb219f5f000812901b

😎 Browse the preview: https://deploy-preview-2042--apisix-dashboard.netlify.app/

web/src/app.tsx Outdated Show resolved Hide resolved
web/src/app.tsx Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #2042 (f6a67e1) into master (af85591) will increase coverage by 1.82%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2042      +/-   ##
==========================================
+ Coverage   63.52%   65.35%   +1.82%     
==========================================
  Files         121      121              
  Lines        3213     3221       +8     
  Branches      779      782       +3     
==========================================
+ Hits         2041     2105      +64     
+ Misses       1172     1116      -56     
Flag Coverage Δ
frontend-e2e-test 65.35% <100.00%> (+1.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
web/src/app.tsx 100.00% <100.00%> (ø)
web/src/helpers.tsx 72.13% <0.00%> (+3.27%) ⬆️
web/src/components/Upstream/UpstreamForm.tsx 92.20% <0.00%> (+9.09%) ⬆️
...ts/Upstream/components/active-check/ReqHeaders.tsx 50.00% <0.00%> (+41.66%) ⬆️
...m/components/active-check/Healthy/HttpStatuses.tsx 75.00% <0.00%> (+66.66%) ⬆️
...components/active-check/Unhealthy/HttpStatuses.tsx 75.00% <0.00%> (+66.66%) ⬆️
...mponents/Upstream/components/active-check/Host.tsx 100.00% <0.00%> (+66.66%) ⬆️
...mponents/Upstream/components/active-check/Port.tsx 100.00% <0.00%> (+66.66%) ⬆️
...mponents/Upstream/components/active-check/Type.tsx 100.00% <0.00%> (+66.66%) ⬆️
...nents/Upstream/components/active-check/Timeout.tsx 100.00% <0.00%> (+66.66%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af85591...f6a67e1. Read the comment docs.

@liuxiran liuxiran merged commit 5198854 into apache:master Aug 7, 2021
@liuxiran
Copy link
Contributor

liuxiran commented Aug 7, 2021

merged, thanks a lot

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.

[health_check] validate form item "checks.active.port"
5 participants