-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(http): also read path parameters in HttpRequestParser<T>
This allows to access in http listeners all parameters that come from the url. ```typescript @http.GET('team/:id') async team(id: string) {} onAuth.listen((event, parser: HttpRequestParser<{id: string}>) => { const data = await parser(); console.log(data.teamId); }); ``` These parameters must be present in the method/function definition, otherwise they are not included (the definition alone in the path string is not enough)
- Loading branch information
Showing
3 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
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
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
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