From cf44382f78053b0c79928416ebdcdd91a1be3309 Mon Sep 17 00:00:00 2001 From: Natalia Gill Date: Thu, 27 Jul 2023 19:50:38 +0000 Subject: [PATCH 1/2] Modifying the data type being used for allChallenges in api_processor from array to object. --- util/api_proccesor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/api_proccesor.js b/util/api_proccesor.js index 8e57c798..9c73d25b 100644 --- a/util/api_proccesor.js +++ b/util/api_proccesor.js @@ -72,7 +72,7 @@ export function createDashboardObject(superblock) { dashedName: course, allChallenges: currBlock[certificationName]['blocks'][course][ 'challenges' - ]['challengeOrder'].map(x => x[0]), + ]['challengeOrder'].map(x => Object.values(x)), order: currBlock[certificationName]['blocks'][course]['challenges'][ 'order' From 8b09849a8c4b05c2bcd317743bf0b0946946799a Mon Sep 17 00:00:00 2001 From: Natalia Gill Date: Sun, 30 Jul 2023 19:36:51 +0000 Subject: [PATCH 2/2] Updating allChallenges to accommodate the FCC response changes for curriculum data and removing redundant map iteration. --- util/api_proccesor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/api_proccesor.js b/util/api_proccesor.js index 9c73d25b..f645eea4 100644 --- a/util/api_proccesor.js +++ b/util/api_proccesor.js @@ -70,9 +70,10 @@ export function createDashboardObject(superblock) { */ selector: course, dashedName: course, - allChallenges: currBlock[certificationName]['blocks'][course][ - 'challenges' - ]['challengeOrder'].map(x => Object.values(x)), + allChallenges: + currBlock[certificationName]['blocks'][course]['challenges'][ + 'challengeOrder' + ], order: currBlock[certificationName]['blocks'][course]['challenges'][ 'order'