From 651bd642a30efc2e0aecff3d448fa41822fc01b3 Mon Sep 17 00:00:00 2001 From: welefen Date: Wed, 21 May 2014 21:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Djshint=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Lib/Driver/Cache/MemcacheCache.js | 4 ++-- lib/Lib/Driver/Socket/MemcacheSocket.js | 4 ---- lib/Lib/Extend/Controller/RestController.js | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/Lib/Driver/Cache/MemcacheCache.js b/lib/Lib/Driver/Cache/MemcacheCache.js index 89d04051..cd5b1a45 100644 --- a/lib/Lib/Driver/Cache/MemcacheCache.js +++ b/lib/Lib/Driver/Cache/MemcacheCache.js @@ -1,14 +1,14 @@ var memcache = thinkRequire("MemcacheSocket"); module.exports = Cache(function(){ "use strict"; - var instance = null;; + var instance = null; return { namePrefix: "__thinkjs__", init: function(options){ this.super_("init", options); if (!instance) { instance = memcache(C('memcache_port'), C('memcache_host')); - }; + } this.handle = instance; }, get: function(name){ diff --git a/lib/Lib/Driver/Socket/MemcacheSocket.js b/lib/Lib/Driver/Socket/MemcacheSocket.js index 650769b5..182d13c3 100644 --- a/lib/Lib/Driver/Socket/MemcacheSocket.js +++ b/lib/Lib/Driver/Socket/MemcacheSocket.js @@ -226,10 +226,6 @@ module.exports = inherits(EventEmitter, function(){ * @return {[type]} [description] */ increment: function(key, step){ - if (typeof step === 'function') { - callback = step; - step = 1; - } step = step || 1; return this.query('incr ' + key + ' ' + step, 'simple'); }, diff --git a/lib/Lib/Extend/Controller/RestController.js b/lib/Lib/Extend/Controller/RestController.js index 547bc34f..336c8e47 100644 --- a/lib/Lib/Extend/Controller/RestController.js +++ b/lib/Lib/Extend/Controller/RestController.js @@ -2,7 +2,7 @@ * REST Controller * @return {[type]} [description] */ -modulex.exports = Controller(function(){ +module.exports = Controller(function(){ return { __before: function(){