mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 17:00:24 +01:00
removed optional params
This commit is contained in:
@@ -196,15 +196,6 @@ module.exports = function(db, module) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function sortedSetUnion(sets, reverse, start, stop, callback) {
|
function sortedSetUnion(sets, reverse, start, stop, callback) {
|
||||||
if (typeof start === 'function') {
|
|
||||||
callback = start;
|
|
||||||
start = 0;
|
|
||||||
stop = -1;
|
|
||||||
} else if (typeof stop === 'function') {
|
|
||||||
callback = stop;
|
|
||||||
stop = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
async.map(sets, function(key, next) {
|
async.map(sets, function(key, next) {
|
||||||
module.getListRange(key, 0, -1, next);
|
module.getListRange(key, 0, -1, next);
|
||||||
}, function(err, results) {
|
}, function(err, results) {
|
||||||
|
|||||||
@@ -177,14 +177,6 @@ module.exports = function(db, module) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function getSortedSetUnion(sets, sort, start, stop, callback) {
|
function getSortedSetUnion(sets, sort, start, stop, callback) {
|
||||||
if (typeof start === 'function') {
|
|
||||||
callback = start;
|
|
||||||
start = 0;
|
|
||||||
stop = -1;
|
|
||||||
} else if (typeof stop === 'function') {
|
|
||||||
callback = stop;
|
|
||||||
stop = -1;
|
|
||||||
}
|
|
||||||
var limit = stop - start + 1;
|
var limit = stop - start + 1;
|
||||||
if (limit <= 0) {
|
if (limit <= 0) {
|
||||||
limit = 0;
|
limit = 0;
|
||||||
|
|||||||
@@ -107,16 +107,6 @@ module.exports = function(redisClient, module) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function sortedSetUnion(sets, reverse, start, stop, callback) {
|
function sortedSetUnion(sets, reverse, start, stop, callback) {
|
||||||
// start and stop optional
|
|
||||||
if (typeof start === 'function') {
|
|
||||||
callback = start;
|
|
||||||
start = 0;
|
|
||||||
stop = -1;
|
|
||||||
} else if (typeof stop === 'function') {
|
|
||||||
callback = stop;
|
|
||||||
stop = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
var multi = redisClient.multi();
|
var multi = redisClient.multi();
|
||||||
|
|
||||||
// zunionstore prep
|
// zunionstore prep
|
||||||
|
|||||||
@@ -325,13 +325,13 @@ describe('Test database', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getSortedSetUnion(callback) {
|
function getSortedSetUnion(callback) {
|
||||||
db.getSortedSetUnion(['users:joindate', 'users:derp', 'users:postcount'], function(err, data) {
|
db.getSortedSetUnion(['users:joindate', 'users:derp', 'users:postcount'], 0, -1, function(err, data) {
|
||||||
callback(err, {'sortedSetUnion': data});
|
callback(err, {'sortedSetUnion': data});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSortedSetRevUnion(callback) {
|
function getSortedSetRevUnion(callback) {
|
||||||
db.getSortedSetUnion(['users:joindate', 'users:derp', 'users:postcount'], function(err, data) {
|
db.getSortedSetRevUnion(['users:joindate', 'users:derp', 'users:postcount'], 0, -1, function(err, data) {
|
||||||
callback(err, {'sortedSetUnion': data});
|
callback(err, {'sortedSetUnion': data});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user