Skip to content

Conversation

sdangol
Copy link
Contributor

@sdangol sdangol commented Sep 22, 2025

Summary

This PR updates the signatures of the Middleware function to use a single parameter object instead of multiple parameters. It also updates the request property of the RequestContext type to use the shortened version req to make it consistent with the response res

Changes

Please provide a summary of what's being changed

  • Updated the middleware signatures
  • Changed all occurence of reqCtx.request to reqCtx.req

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: closes #4480 and #4518


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@boring-cyborg boring-cyborg bot added event-handler This item relates to the Event Handler Utility tests PRs that add or change tests labels Sep 22, 2025
@sdangol sdangol self-assigned this Sep 22, 2025
@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Sep 22, 2025
@sdangol
Copy link
Contributor Author

sdangol commented Sep 22, 2025

@dreamorosi As per our conversation about making params as part of reqCtx, it might not be just those that would be affected. We might need to make changes to the RouteHandler and the resolve function as well?

@dreamorosi
Copy link
Contributor

Sure, let's do it, although I'm ok to do it in a separate PR if you think this is gonna balloon too much.

@sdangol
Copy link
Contributor Author

sdangol commented Sep 22, 2025

Yeah, I think there might be more changes than I had expected. Let's merge this one first.

Copy link

@dreamorosi dreamorosi merged commit a05c074 into main Sep 22, 2025
37 checks passed
@dreamorosi dreamorosi deleted the improv/middleware-signature branch September 22, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-handler This item relates to the Event Handler Utility size/L PRs between 100-499 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request - consider changing the RequestContext abbreviated response name res to response Maintenance: update middleware signature to object
3 participants