Skip to content
Myr

renamed Router#_route() -> route()

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 81d25f6 · Browse files · 4 files+30 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

4 files+30 added−3 removed

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

4 files+30 added−3 removed

modified:lib/router/index.js+2 added-1 removed
392 unmodified lines
393 * @return {Router} for chaining394 * @api private395 */396397Router.prototype._route = function(method, path, callbacks){397Router.prototype.route = function(method, path, callbacks){398 var app = this.app399 , method = method.toLowerCase()400 , callbacks = utils.flatten([].slice.call(arguments, 2));401402 // ensure path was given403 if (!path) throw new Error('Router#' + method + '() requires a path');
12 unmodified lines
modified:lib/application.js+1 added-1 removed
466 unmodified lines
467 app[method] = function(path){468 if ('get' == method && 1 == arguments.length) return this.set(path); 469 var args = [method].concat([].slice.call(arguments));470 if (!this._usedRouter) this.use(this.router);471 return this._router._route.apply(this._router, args);471 return this._router.route.apply(this._router, args);472 }473});474475/**
84 unmodified lines
added:test/Router.js+27 added
modified:test/utils.js-1 removed