remove extra debugs
This commit is contained in:
@ -221,26 +221,22 @@ module.exports = function(User) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.flatMap(({ progressTimestamps = [] }) => {
|
.flatMap(({ progressTimestamps = [] }) => {
|
||||||
debug('progressTimestamps', progressTimestamps);
|
|
||||||
return Observable.from(progressTimestamps);
|
return Observable.from(progressTimestamps);
|
||||||
})
|
})
|
||||||
// filter out non objects
|
// filter out non objects
|
||||||
.filter((timestamp) => !!timestamp || typeof timestamp === 'object')
|
.filter((timestamp) => !!timestamp || typeof timestamp === 'object')
|
||||||
// filterout timestamps older then an hour
|
// filterout timestamps older then an hour
|
||||||
.filter(({ timestamp = 0 }) => {
|
.filter(({ timestamp = 0 }) => {
|
||||||
debug('timestamp', timestamp);
|
|
||||||
return timestamp >= oneHourAgo;
|
return timestamp >= oneHourAgo;
|
||||||
})
|
})
|
||||||
// filter out brownie points given by giver
|
// filter out brownie points given by giver
|
||||||
.filter((browniePoint) => {
|
.filter((browniePoint) => {
|
||||||
debug('browniePoint', browniePoint);
|
|
||||||
return browniePoint.giver === giver;
|
return browniePoint.giver === giver;
|
||||||
})
|
})
|
||||||
// no results means this is the first brownie point given by giver
|
// no results means this is the first brownie point given by giver
|
||||||
// so return -1 to indicate receiver should receive point
|
// so return -1 to indicate receiver should receive point
|
||||||
.firstOrDefault(null, -1)
|
.firstOrDefault(null, -1)
|
||||||
.flatMap((browniePointsFromGiver) => {
|
.flatMap((browniePointsFromGiver) => {
|
||||||
debug('bronie points from giver', browniePointsFromGiver, giver);
|
|
||||||
if (browniePointsFromGiver === -1) {
|
if (browniePointsFromGiver === -1) {
|
||||||
|
|
||||||
return user$.flatMap((user) => {
|
return user$.flatMap((user) => {
|
||||||
|
Reference in New Issue
Block a user