fix(frontend): Leerpaden voor thema's opvragen in de juiste taal

This commit is contained in:
Gerald Schmittinger 2025-05-14 09:41:09 +02:00
parent 9e8770cf06
commit a1c9f37081
4 changed files with 10 additions and 8 deletions

View file

@ -26,8 +26,8 @@ export class LearningPathController extends BaseController {
});
return LearningPath.fromDTO(single(dtos));
}
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));
}