Skip to content

Commit dd10b34

Browse files
docs(route-wildcards): add warning to route wildcards section
- only express has support for wildcards in the middle of routes - when using fastify an error is thrown
1 parent d9170e2 commit dd10b34

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/controllers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ findAll() {
202202

203203
The `'ab*cd'` route path will match `abcd`, `ab_cd`, `abecd`, and so on. The characters `?`, `+`, `*`, and `()` may be used in a route path, and are subsets of their regular expression counterparts. The hyphen ( `-`) and the dot (`.`) are interpreted literally by string-based paths.
204204

205+
> **Warning** A wildcard in the middle of the route is only supported by express.
206+
205207
#### Status code
206208

207209
As mentioned, the response **status code** is always **200** by default, except for POST requests which are **201**. We can easily change this behavior by adding the `@HttpCode(...)` decorator at a handler level.

0 commit comments

Comments
 (0)