pass an optional next to app.callback()

This commit is contained in:
Jonathan Ong 2013-11-08 01:17:41 -08:00
parent 01e0f838e6
commit accb1d6a61

View file

@ -88,10 +88,10 @@ app.callback = function(){
var gen = compose(mw);
var self = this;
return function(req, res){
return function(req, res, next){
var ctx = new Context(self, req, res);
co.call(ctx, gen)(ctx.onerror);
co.call(ctx, gen)(next || ctx.onerror);
}
};