Skip to content

Commit

Permalink
Dashify challenge block property on seed
Browse files Browse the repository at this point in the history
  • Loading branch information
Berkeley Martinez authored and Berkeley Martinez committed Jul 29, 2016
1 parent acf4d99 commit 5d4a92b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion seed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Observable.combineLatest(
challenge.helpRoom = helpRoom;
challenge.order = order;
challenge.suborder = index + 1;
challenge.block = blockName;
challenge.block = dasherize(blockName);
challenge.blockId = block.id;
challenge.isBeta = challenge.isBeta || isBeta;
challenge.isComingSoon = challenge.isComingSoon || isComingSoon;
Expand Down
5 changes: 2 additions & 3 deletions server/services/map.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Observable } from 'rx';
import { Schema, valuesOf, arrayOf, normalize } from 'normalizr';
import { nameify, dasherize, unDasherize } from '../utils';
import { dashify } from '../../common/utils';
import debug from 'debug';

const isDev = process.env.NODE_ENV !== 'production';
Expand Down Expand Up @@ -179,11 +178,11 @@ function getChallengeByDashedName(dashedName, challengeMap$) {
})
.map(challenge => ({
redirect:
`/challenges/${dashify(challenge.block)}/${challenge.dashedName}`,
`/challenges/${challenge.block}/${challenge.dashedName}`,
entities: { challenge: { [challenge.dashedName]: challenge } },
result: {
challenge: challenge.dashedName,
block: dashify(challenge.block)
block: challenge.block
}
}));
}
Expand Down

0 comments on commit 5d4a92b

Please sign in to comment.