mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
sets are storing numbers in mongo as opposed to redis which stores strings, causes tons of problems
This commit is contained in:
@@ -287,14 +287,11 @@
|
||||
}
|
||||
|
||||
module.isMemberOfSets = function(sets, value, callback) {
|
||||
|
||||
|
||||
function iterator(set, next) {
|
||||
module.isSetMember(set, value, next);
|
||||
}
|
||||
|
||||
async.map(sets, iterator, function(err, result) {
|
||||
console.log(err, result);
|
||||
callback(err, result);
|
||||
});
|
||||
|
||||
|
||||
@@ -146,7 +146,16 @@
|
||||
if (!exists) {
|
||||
db.incrObjectField('global', 'nextGid', function (err, gid) {
|
||||
db.setObjectField('group:gid', name, gid, function(err) {
|
||||
db.setObject('gid:' + gid, {}, function(err) {
|
||||
|
||||
var groupData = {
|
||||
gid: gid,
|
||||
name: name,
|
||||
description: description,
|
||||
deleted: '0',
|
||||
hidden: '0'
|
||||
};
|
||||
|
||||
db.setObject('gid:' + gid, groupData, function(err) {
|
||||
|
||||
Groups.get(gid, {}, callback);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user