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 challengeCollection = db.collection('challenge');
|
||||
|
||||
challengeCollection.deleteMany({}, err => {
|
||||
challengeCollection.deleteMany({}, async err => {
|
||||
handleError(err, client);
|
||||
|
||||
log('deleted all the challenges');
|
||||
|
||||
const curriculum = getChallengesForLang(lang);
|
||||
const curriculum = await getChallengesForLang(lang);
|
||||
|
||||
const allChallenges = Object.keys(curriculum)
|
||||
.map(key => curriculum[key].blocks)
|
||||
|
Reference in New Issue
Block a user