Implements a 'releasedOn' flag and marks challenges less than 30 days old as NEW https://www.dropbox.com/s/43un2a908ldktpl/Screenshot%202015-11-01%2017.06.53.png
This commit is contained in:
@@ -537,6 +537,11 @@ module.exports = function(app) {
|
||||
if (completedChallenges.indexOf(challenge.id) !== -1) {
|
||||
challenge.completed = true;
|
||||
}
|
||||
if (typeof(challenge.releasedOn) !== 'undefined'
|
||||
&& moment(challenge.releasedOn, 'MMM MMMM DD, YYYY').diff(moment(),
|
||||
'days') >= -30) {
|
||||
challenge.markNew = true;
|
||||
}
|
||||
return challenge;
|
||||
})
|
||||
// group challenges by block | returns a stream of observables
|
||||
|
Reference in New Issue
Block a user