-
-
Notifications
You must be signed in to change notification settings - Fork 94
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: Make Controller the middleware API #2290
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ntucker
force-pushed
the
managers
branch
2 times, most recently
from
November 20, 2022 00:10
f7327ed
to
a875319
Compare
Codecov Report
@@ Coverage Diff @@
## master #2290 +/- ##
==========================================
- Coverage 98.31% 98.21% -0.10%
==========================================
Files 125 125
Lines 1955 1963 +8
Branches 293 295 +2
==========================================
+ Hits 1922 1928 +6
- Misses 16 18 +2
Partials 17 17
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ntucker
force-pushed
the
managers
branch
2 times, most recently
from
November 20, 2022 02:56
370f7fc
to
d2a188b
Compare
ntucker
added a commit
that referenced
this pull request
Nov 20, 2022
ntucker
changed the title
feat: Supply full controller to managers
feat: Make Controller the middleware API
Nov 20, 2022
ntucker
force-pushed
the
managers
branch
2 times, most recently
from
November 21, 2022 01:10
e665255
to
0bd727c
Compare
notwillk
approved these changes
Nov 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Simplify interface, make easier to write managers
Solution
Since Controller is now a superset of the normal middlware API, we can just send its entirety
Note, since we previously added controller as one of the members, we have to adapt the controller in applyManagers like so:
Open questions
This technically breaks someone trying to call middlewares themselves outside of rest hooks, but I cannot imagine a use case for that.