diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js index b6dc79e1..de53496d 100644 --- a/lib/cloudfunc.js +++ b/lib/cloudfunc.js @@ -77,12 +77,6 @@ var Util; return names; }; - this.isJoinURL = function(url) { - var ret = Util.isContainStrAtBegin(url, JOIN); - - return ret; - }; - this.formatMsg = function(msg, name, status) { if (!status) status = 'ok'; diff --git a/lib/server/join.js b/lib/server/join.js index 305d893e..42bfc4aa 100644 --- a/lib/server/join.js +++ b/lib/server/join.js @@ -16,10 +16,11 @@ exec = Util.exec, readFunc = exec.with(readPipe, req, res), path = main.getPathName(req), - isJoin = CloudFunc.isJoinURL(path); + regExp = new RegExp('^/join'), + isJoin = path.match(regExp); if (!isJoin) { - exec(callback); + callback(); } else { names = CloudFunc.getJoinArray(path);