mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
added sortedSetRemove to mongo
This commit is contained in:
@@ -247,12 +247,14 @@
|
||||
value:value
|
||||
};
|
||||
|
||||
data.setName = key
|
||||
data.setName = key;
|
||||
module.setObject(key+':'+value, data, callback);
|
||||
}
|
||||
|
||||
module.sortedSetRemove = function(key, value, callback) {
|
||||
throw new Error('not-implemented');
|
||||
db.collection('objects').remove({setName:key, value:value}, function(err, result) {
|
||||
callback(err, result);
|
||||
});
|
||||
}
|
||||
|
||||
function getSortedSetRange(key, start, stop, sort, callback) {
|
||||
|
||||
@@ -164,6 +164,13 @@ var DebugRoute = function(app) {
|
||||
});
|
||||
}
|
||||
|
||||
function sortedSetRemove(callback) {
|
||||
db.sortedSetRemove('sortedSet2', 12, function(err, data) {
|
||||
console.log('sortedSetRemove return', data);
|
||||
callback(err, {'sortedSetRemove': data});
|
||||
});
|
||||
}
|
||||
|
||||
function getSortedSetRange(callback) {
|
||||
db.getSortedSetRevRange('sortedSet2', 0, -1, function(err, data) {
|
||||
console.log('getSortedSetRange return', data);
|
||||
@@ -199,7 +206,9 @@ var DebugRoute = function(app) {
|
||||
//sortedSetAdd,
|
||||
getSortedSetRange,
|
||||
sortedSetAdd,
|
||||
getSortedSetRange
|
||||
getSortedSetRange,
|
||||
sortedSetRemove,
|
||||
getSortedSetRange,
|
||||
];
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user