fix: Build errors
This commit is contained in:
parent
8f5b625cc3
commit
cb82a1afa7
3 changed files with 6 additions and 6 deletions
|
@ -11,7 +11,7 @@ export async function getLearningPaths(req: Request, res: Response): Promise<voi
|
|||
const hruids = req.query.hruid;
|
||||
const themeKey = req.query.theme as string;
|
||||
const searchQuery = req.query.search as string;
|
||||
const language = (req.query.language as string) || FALLBACK_LANG;
|
||||
const language = (req.query.language as Language) || FALLBACK_LANG;
|
||||
|
||||
let hruidList;
|
||||
|
||||
|
@ -28,14 +28,14 @@ export async function getLearningPaths(req: Request, res: Response): Promise<voi
|
|||
return;
|
||||
}
|
||||
} else if (searchQuery) {
|
||||
const searchResults = await searchLearningPaths(searchQuery, language);
|
||||
const searchResults = await learningPathService.searchLearningPaths(searchQuery, language);
|
||||
res.json(searchResults);
|
||||
return;
|
||||
} else {
|
||||
hruidList = themes.flatMap((theme) => theme.hruids);
|
||||
}
|
||||
|
||||
const learningPaths = await fetchLearningPaths(hruidList, language, `HRUIDs: ${hruidList.join(', ')}`);
|
||||
const learningPaths = await learningPathService.fetchLearningPaths(hruidList, language, `HRUIDs: ${hruidList.join(', ')}`);
|
||||
res.json(learningPaths.data);
|
||||
} catch (error) {
|
||||
getLogger().error('❌ Unexpected error fetching learning paths:', error);
|
||||
|
|
|
@ -14,8 +14,8 @@ export class Question {
|
|||
})
|
||||
learningObjectLanguage!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectVersion: string = '1';
|
||||
@PrimaryKey({ type: 'number' })
|
||||
learningObjectVersion: number = 1;
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
sequenceNumber!: number;
|
||||
|
|
|
@ -91,7 +91,7 @@ export interface FilteredLearningObject {
|
|||
htmlUrl: string;
|
||||
language: Language;
|
||||
difficulty: number;
|
||||
estimatedTime: number;
|
||||
estimatedTime?: number;
|
||||
available: boolean;
|
||||
teacherExclusive: boolean;
|
||||
educationalGoals: EducationalGoal[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue