Skip to content

Instantly share code, notes, and snippets.

@jbmarflo
Created October 20, 2024 22:13
Show Gist options
  • Save jbmarflo/3bc0ba02614c60e3102f6156977d0a39 to your computer and use it in GitHub Desktop.
Save jbmarflo/3bc0ba02614c60e3102f6156977d0a39 to your computer and use it in GitHub Desktop.
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