Created
October 20, 2024 22:13
-
-
Save jbmarflo/3bc0ba02614c60e3102f6156977d0a39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async getLearningCapsulesForBranch(branchUuid: string) { | |
const TOPICS = await this.getTopicsAndSubtopics(branchUuid); | |
return this.getLearningCapsules(TOPICS); | |
} | |
private async getLearningCapsulesForPathway(pathwayUuid: string): Promise<LearningCapsuleStructure[]> { | |
const PATHWAY_BRANCHES = await this.getBranchesByPathway(pathwayUuid); | |
let allLearningCapsules = []; | |
for (const branch of PATHWAY_BRANCHES) { | |
const capsules = await this.getLearningCapsulesForBranch(branch.branchUuid); | |
allLearningCapsules = [...allLearningCapsules, ...capsules]; | |
} | |
return allLearningCapsules; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment