mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
feature(join) before, req, res, next -> before
This commit is contained in:
parent
367e84b4b1
commit
19183b3506
2 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue