cleanup toggleFollow

v1.18.x
barisusakli 11 years ago
parent 8afcf44732
commit d272a87c8a

@ -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);
}
});
});

Loading…
Cancel
Save