mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-09-01 04:46:26 +02:00
closed #1453
This commit is contained in:
@@ -79,6 +79,10 @@ module.exports = function(db, module) {
|
||||
module.setObject(key, data, callback);
|
||||
};
|
||||
|
||||
module.increment = function(key, callback) {
|
||||
db.collection('objects').update({_key: key}, { $inc: { value: 1 } }, helpers.done(callback));
|
||||
};
|
||||
|
||||
module.rename = function(oldKey, newKey, callback) {
|
||||
db.collection('objects').update({_key: oldKey}, {$set:{_key: newKey}}, helpers.done(callback));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user