This commit is contained in:
Gerald Schmittinger 2025-05-14 23:37:06 +02:00
commit ebc4c16c89
7 changed files with 67 additions and 15 deletions

View file

@ -29,8 +29,8 @@ export class LearningPathController extends BaseController {
}
return LearningPath.fromDTO(dtos[0]);
}
async getAllByTheme(theme: string): Promise<LearningPath[]> {
const dtos = await this.get<LearningPathDTO[]>("/", { theme });
async getAllByThemeAndLanguage(theme: string, language: Language): Promise<LearningPath[]> {
const dtos = await this.get<LearningPathDTO[]>("/", { theme, language });
return dtos.map((dto) => LearningPath.fromDTO(dto));
}