fix(tools): setup seed
This commit is contained in:
committed by
Kristofer Koishigawa
parent
cee98aef43
commit
22ed2b964a
@ -37,12 +37,12 @@ MongoClient.connect(
|
|||||||
const db = client.db('freecodecamp');
|
const db = client.db('freecodecamp');
|
||||||
const challengeCollection = db.collection('challenge');
|
const challengeCollection = db.collection('challenge');
|
||||||
|
|
||||||
challengeCollection.deleteMany({}, err => {
|
challengeCollection.deleteMany({}, async err => {
|
||||||
handleError(err, client);
|
handleError(err, client);
|
||||||
|
|
||||||
log('deleted all the challenges');
|
log('deleted all the challenges');
|
||||||
|
|
||||||
const curriculum = getChallengesForLang(lang);
|
const curriculum = await getChallengesForLang(lang);
|
||||||
|
|
||||||
const allChallenges = Object.keys(curriculum)
|
const allChallenges = Object.keys(curriculum)
|
||||||
.map(key => curriculum[key].blocks)
|
.map(key => curriculum[key].blocks)
|
||||||
|
Reference in New Issue
Block a user