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
Refactor: move BodyParser to upper level #1841
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1841 +/- ##
=======================================
Coverage 83.44% 83.44%
=======================================
Files 48 48
Lines 2537 2537
Branches 586 594 +8
=======================================
Hits 2117 2117
+ Misses 416 415 -1
- Partials 4 5 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hydra13 looks good to me, but I will run a few tests before the merge.
Sure! Could you share the results of your test? |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Are running 🙃 ... 3 new acceptant test running in 3 different package managers using latest changes. You can check the latest master commit. I guess that's good enough for me if they pass (still running) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hydra13 hopefully this helps you.
This reverts commit 67c31b6
This can be useful when the middleware plugin has to get access to the request's body.
I tried to make publication and add some field "on the fly" and didn't get access to the request's body. (link to my example plugin)
The reason for this problem was that body-parser was used in
src/api/endpoint/index.ts
and middleware plugins registered before ones.My PR just moves the call of body-parser from
src/api/endpoint/index.ts
tosrc/api/index.ts
(above registration middleware plugins)