@ -69,6 +69,10 @@ function getIDsByCondition(condition, callback) {
function filterCompletedRewards(uid, rewards, callback) {
db.getSortedSetRangeByScoreWithScores('uid:' + uid + ':rewards', 0, -1, 1, Infinity, function(err, data) {
if (err) {
return callback(err);
}
var userRewards = {};
data.forEach(function(obj) {