Skip to content
Myr

Deprecate app.param(fn)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #2429

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 1616079 · Browse files · 2 files+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−2 removed

  • other:+4 added−2 removed

2 files+4 added−2 removed

modified:lib/router/index.js+3 added-2 removed
80 unmodified lines
81 * @return {app} for chaining82 * @api public83 */8485proto.param = function(name, fn){85proto.param = function param(name, fn) {86 // param logic87 if ('function' == typeof name) {87 if (typeof name === 'function') {88 deprecate('router.param(fn): Refactor to use path params');89 this._params.push(name);90 return;91 }92
538 unmodified lines
modified:History.md+1 added
1 unmodified line
2==========34 * Deprecate leading `:` in `name` for `app.param(name, fn)`5 * Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead6 * Deprecate `app.param(fn)`7 * Fix `OPTIONS` responses to include the `HEAD` method properly8 * Fix `res.sendFile` not always detecting aborted connection9 * Match routes iteratively to prevent stack overflows10
2549 unmodified lines