From 8693e19eae89ed141820914193d6efbbe01d3028 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Aug 2014 10:14:59 -0400 Subject: [PATCH] feature(cloudfunc) rm isJoinURL --- lib/cloudfunc.js | 6 ------ lib/server/join.js | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) 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);