Skip to content

Commit

Permalink
remove hikes from map
Browse files Browse the repository at this point in the history
  • Loading branch information
Berkeley Martinez authored and Berkeley Martinez committed Aug 13, 2015
1 parent cd9dcc6 commit 7eaccff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/boot/challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ module.exports = function(app) {
name: blockArray[0].block,
dashedName: dasherize(blockArray[0].block),
challenges: blockArray
}));
}))
.filter(({ name })=> {
return name !== 'Hikes';
})
.shareReplay();

const User = app.models.User;
const userCount$ = observeMethod(User, 'count');
Expand Down Expand Up @@ -135,6 +139,7 @@ module.exports = function(app) {
const challengeId = req.user.currentChallenge.challengeId;
// find challenge
return challenge$
.filter(({ block }) => block !== 'Hikes')
.filter(({ id }) => id === challengeId)
// now lets find the block it belongs to
.flatMap(challenge => {
Expand Down Expand Up @@ -537,6 +542,7 @@ module.exports = function(app) {
completed: completedCount / blockArray.length * 100
};
})
.filter(({ name }) => name !== 'Hikes')
// turn stream of blocks into a stream of an array
.toArray();

Expand Down

0 comments on commit 7eaccff

Please sign in to comment.