Skip to content

Node.js based forum software built for the modern web

fix redis union

barisusaklie1253f693ac0
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