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

feat(#69): allow to pass values to the next function if the middleware closes the request - closes #69 #87

Merged
merged 4 commits into from
Sep 14, 2024

Conversation

francescovallone
Copy link
Owner

Description

Instead of allowing the finalization of the request using the InternalResponse object directly, Serinus will allow to pass a value in the next function and, since the RequestContext has the res property it won't be necessary to pass the InternalResponse object in the use method anymore.

Fixes #69

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

codecov bot commented Sep 14, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.75%. Comparing base (4971bb2) to head (66edff8).

Files with missing lines Patch % Lines
packages/serinus/test/core/middlewares_test.dart 90.47% 2 Missing ⚠️
packages/serinus/lib/src/core/middleware.dart 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #87      +/-   ##
===========================================
+ Coverage    89.66%   89.75%   +0.08%     
===========================================
  Files           73       73              
  Lines         2584     2605      +21     
===========================================
+ Hits          2317     2338      +21     
  Misses         267      267              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@francescovallone francescovallone merged commit cfbbf65 into develop Sep 14, 2024
8 checks passed
@francescovallone francescovallone deleted the feat/69 branch September 16, 2024 18:21
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.

1 participant