Merge pull request #16759 from Bouncey/fix/filtrePrivateChallenges
fix(redirects): Do not add private blocks/challenges to the map
This commit is contained in:
@ -33,7 +33,8 @@ const getFirstChallenge = _.once(_getFirstChallenge);
|
|||||||
*/
|
*/
|
||||||
export function _cachedMap({ Block, Challenge }) {
|
export function _cachedMap({ Block, Challenge }) {
|
||||||
const challenges = Challenge.find$({
|
const challenges = Challenge.find$({
|
||||||
order: [ 'order ASC', 'suborder ASC' ]
|
order: [ 'order ASC', 'suborder ASC' ],
|
||||||
|
where: { isPrivate: false }
|
||||||
});
|
});
|
||||||
const challengeMap = challenges
|
const challengeMap = challenges
|
||||||
.map(
|
.map(
|
||||||
@ -44,7 +45,10 @@ export function _cachedMap({ Block, Challenge }) {
|
|||||||
return hash;
|
return hash;
|
||||||
}, {})
|
}, {})
|
||||||
);
|
);
|
||||||
const blocks = Block.find$({ order: [ 'superOrder ASC', 'order ASC' ] });
|
const blocks = Block.find$({
|
||||||
|
order: [ 'superOrder ASC', 'order ASC' ],
|
||||||
|
where: { isPrivate: false }
|
||||||
|
});
|
||||||
const blockMap = Observable.combineLatest(
|
const blockMap = Observable.combineLatest(
|
||||||
blocks.map(
|
blocks.map(
|
||||||
blocks => blocks
|
blocks => blocks
|
||||||
|
Reference in New Issue
Block a user