From e1253f693ac0e60dbeec73c4b73985afe82d4104 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 23 Dec 2016 14:26:05 +0300 Subject: [PATCH] fix redis union --- src/database/redis/sorted.js | 2 +- src/database/redis/sorted/union.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/database/redis/sorted.js b/src/database/redis/sorted.js index 978c8bc765..1e8c629fa9 100644 --- a/src/database/redis/sorted.js +++ b/src/database/redis/sorted.js @@ -29,7 +29,7 @@ module.exports = function (redisClient, module) { function sortedSetRange(method, key, start, stop, withScores, callback) { if (Array.isArray(key)) { - return sortedSetUnion({method: method, sets: key, start: start, stop: stop, withScores: withScores}, callback); + return module.sortedSetUnion({method: method, sets: key, start: start, stop: stop, withScores: withScores}, callback); } var params = [key, start, stop]; diff --git a/src/database/redis/sorted/union.js b/src/database/redis/sorted/union.js index 2a03f2f142..677b086259 100644 --- a/src/database/redis/sorted/union.js +++ b/src/database/redis/sorted/union.js @@ -21,15 +21,15 @@ module.exports = function (redisClient, module) { module.getSortedSetUnion = function (params, callback) { params.method = 'zrange'; - sortedSetUnion(params, callback); + module.sortedSetUnion(params, callback); }; module.getSortedSetRevUnion = function (params, callback) { params.method = 'zrevrange'; - sortedSetUnion(params, callback); + module.sortedSetUnion(params, callback); }; - function sortedSetUnion(params, callback) { + module.sortedSetUnion = function (params, callback) { var tempSetName = 'temp_' + Date.now(); @@ -56,5 +56,5 @@ module.exports = function (redisClient, module) { } callback(null, objects); }); - } + }; }; \ No newline at end of file