|
|
|
@ -84,13 +84,13 @@ module.exports = function (User) {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
User.getBannedReason = function (uid, callback) {
|
|
|
|
|
// Grabs the latest ban reason
|
|
|
|
|
db.getSortedSetRevRange('banned:' + uid + ':reasons', 0, 0, function (err, reasons) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
callback(null, reasons.length ? reasons[0] : '');
|
|
|
|
|
});
|
|
|
|
|
async.waterfall([
|
|
|
|
|
function (next) {
|
|
|
|
|
db.getSortedSetRevRange('banned:' + uid + ':reasons', 0, 0, next);
|
|
|
|
|
},
|
|
|
|
|
function (reasons, next) {
|
|
|
|
|
next(null, reasons.length ? reasons[0] : '');
|
|
|
|
|
},
|
|
|
|
|
], callback);
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|