mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
cleanup toggleFollow
This commit is contained in:
@@ -214,13 +214,9 @@ var winston = require('winston'),
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
db[following ? 'setRemove' : 'setAdd']('tid:' + tid + ':followers', uid, function(err, success) {
|
||||
if (callback) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
callback(null, !following);
|
||||
db[following ? 'setRemove' : 'setAdd']('tid:' + tid + ':followers', uid, function(err) {
|
||||
if (typeof callback === 'function') {
|
||||
callback(err, !following);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user