mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
For #5232, added tests and returning flag data on socket flag creation
This commit is contained in:
@@ -34,11 +34,15 @@ SocketFlags.create = function (socket, data, callback) {
|
||||
function (next) {
|
||||
// If we got here, then no errors occurred
|
||||
flags.create(data.type, data.id, socket.uid, data.reason, next);
|
||||
},
|
||||
function (flagObj, next) {
|
||||
flags.notify(flagObj, socket.uid, next);
|
||||
}
|
||||
], callback);
|
||||
], function (err, flagObj) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
flags.notify(flagObj, socket.uid);
|
||||
callback(null, flagObj);
|
||||
});
|
||||
};
|
||||
|
||||
SocketFlags.update = function (socket, data, callback) {
|
||||
|
||||
Reference in New Issue
Block a user