Skip to content
Myr

added test to illustrate req.params as an array

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

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 99b2e0f · Browse files · 2 files+3 added−3 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+3 added−3 removed

  • tests:+2 added−2 removed
  • other:+1 added−1 removed

2 files+3 added−3 removed

modified:lib/request.js+1 added-1 removed
224 unmodified lines
225req.param = function(name, defaultValue){226 var params = this.params || {};227 var body = this.body || {};228 var query = this.query || {};229 if (null != params[name]) return params[name];229 if (null != params[name] && params.hasOwnProperty(name)) return params[name];230 if (null != body[name]) return body[name];231 if (null != query[name]) return query[name];232 return defaultValue;233};
174 unmodified lines
modified:test/req.param.js+2 added-2 removed