Skip to content

Commit 2aa0dd1

Browse files
cds9: changes to req.params (#1873)
1 parent 44c3f2a commit 2aa0dd1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

node.js/events.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,7 @@ This is a convenience shortcut to [`msg.target.name`](#target).
315315

316316
### . params {.property}
317317

318-
Provides access to parameters in URL paths as an [*iterable*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) with the contents matching the positional occurrence of parameters in the url path. In the case of compound parameters, the respective entry is the key value pairs as given in the URL.
319-
<!-- If the respective resource has a single key predicate called `ID`, the value is returned directly. -->
318+
Provides access to parameters in URL paths as an [*iterable*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) with the contents matching the positional occurrence of parameters in the url path. The respective entry is the key value pair matching the entity definition.
320319

321320
For example, the parameters in an HTTP request like that:
322321

@@ -328,7 +327,7 @@ The provided parameters can be accessed as follows:
328327

329328
```js
330329
const [ author, book ] = req.params
331-
// > author === 101
330+
// > author === { ID: 101 }
332331
// > book === { title: 'Eleonora', edition: 2 }
333332
```
334333

0 commit comments

Comments
 (0)