feature(join) before, req, res, next -> before

This commit is contained in:
coderaiser 2014-08-12 10:18:41 -04:00
parent 367e84b4b1
commit 19183b3506
2 changed files with 4 additions and 6 deletions

View file

@ -35,12 +35,8 @@
express = require(DIR_SERVER + 'express'),
expressApp,
emptyHandler = function(req, res, next) { Util.exec(next); },
Rest, Route;
join = join && Util.exec.with(join, beforeJoin) || emptyHandler;
/* базовая инициализация */
function init(appCacheCallback) {
@ -124,7 +120,7 @@
funcs = [
Rest,
Route,
join,
join(beforeJoin),
controller
],

View file

@ -9,7 +9,9 @@
CloudFunc = require(DIR + 'cloudfunc'),
zlib = require('zlib');
module.exports = join;
module.exports = function(before) {
return join.bind(null, before);
};
function join(before, req, res, next) {
var names,