mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-27 17:54:11 +00:00
feature(util) bind -> exec.with
This commit is contained in:
parent
ec9a78a27a
commit
6b58016616
16 changed files with 61 additions and 60 deletions
|
|
@ -11,16 +11,17 @@
|
|||
|
||||
function join(before, req, res, callback) {
|
||||
var names,
|
||||
readFunc = Util.bind(readPipe, req, res),
|
||||
exec = Util.exec,
|
||||
readFunc = exec.with(readPipe, req, res),
|
||||
path = main.getPathName(req),
|
||||
isJoin = CloudFunc.isJoinURL(path);
|
||||
|
||||
if (!isJoin)
|
||||
Util.exec(callback);
|
||||
else {
|
||||
if (!isJoin) {
|
||||
exec(callback);
|
||||
} else {
|
||||
names = CloudFunc.getJoinArray(path);
|
||||
|
||||
Util.exec.if(!before, readFunc, function(callback) {
|
||||
exec.if(!before, readFunc, function(callback) {
|
||||
before(names, callback);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue