controller
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -59,4 +59,6 @@ var isRegExp = require('util').isRegExp; | ||
} | ||
app[route.method](path, middleware, action.handler); | ||
var routeArgs = [path, action.handler]; | ||
if (middleware.length) routeArgs.splice(1, 0, middleware); | ||
app[route.method].apply(app, routeArgs); | ||
}); | ||
} |
{ | ||
"name": "controller", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "an action controller for express", | ||
@@ -5,0 +5,0 @@ "main": "lib/controller.js", |
@@ -62,3 +62,3 @@ var assert = require('assert'); | ||
var didCall = false; | ||
anapp.on('get', function(route, mw, theAction) { | ||
anapp.on('get', function(route, theAction) { | ||
assert(fn === theAction); | ||
@@ -65,0 +65,0 @@ assert(route === '/action'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15591
269