refactor(route) Util.exec(callback) -> callback

This commit is contained in:
coderaiser 2014-09-19 07:12:36 -04:00
parent 07ea970eed
commit 1bdceaac3c

View file

@ -116,7 +116,7 @@
function route(request, response, callback) {
var name, p, isAuth, isFS, path;
Util.checkArgs(arguments, ['req', 'res']);
Util.checkArgs(arguments, ['req', 'res', 'callback']);
name = ponse.getPathName(request);
isAuth = Util.strCmp(name, ['/auth', '/auth/github']);
@ -130,7 +130,7 @@
};
if (!isAuth && !isFS)
Util.exec(callback);
callback();
else if (isAuth) {
Util.log('* Routing' + '-> ' + name);