mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-22 03:51:33 +00:00
Remove router.param(fn) from 5.x docs (#1884)
It has been deprecated since 4.11.0 and in 5.x `router.param()` requires name as the first argument. The description in migration guide was copied from `app.param(fn)` that was mentioned there. Co-authored-by: krzysdz <krzysdz@users.noreply.github.com> Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
This commit is contained in:
@@ -56,6 +56,7 @@ You can find the list of available codemods [here](https://github.com/expressjs/
|
||||
<li><a href="#res.send.body">res.send(body, status)</a></li>
|
||||
<li><a href="#res.send.status">res.send(status)</a></li>
|
||||
<li><a href="#res.sendfile">res.sendfile()</a></li>
|
||||
<li><a href="#router.param">router.param(fn)</a></li>
|
||||
<li><a href="#express.static.mime">express.static.mime</a></li>
|
||||
<li><a href="#express:router-debug-logs">express:router debug logs</a></li>
|
||||
</ul>
|
||||
@@ -335,6 +336,10 @@ app.get('/user', (req, res) => {
|
||||
})
|
||||
```
|
||||
|
||||
<h4 id="router.param">router.param(fn)</h4>
|
||||
|
||||
The `router.param(fn)` signature was used for modifying the behavior of the `router.param(name, fn)` function. It has been deprecated since v4.11.0, and Express 5 no longer supports it at all.
|
||||
|
||||
<h4 id="express.static.mime">express.static.mime</h4>
|
||||
|
||||
In Express 5, `mime` is no longer an exported property of the `static` field.
|
||||
|
||||
Reference in New Issue
Block a user