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 hruids = req.query.hruid;
|
||||||
const themeKey = req.query.theme as string;
|
const themeKey = req.query.theme as string;
|
||||||
const searchQuery = req.query.search 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;
|
let hruidList;
|
||||||
|
|
||||||
|
@ -28,14 +28,14 @@ export async function getLearningPaths(req: Request, res: Response): Promise<voi
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (searchQuery) {
|
} else if (searchQuery) {
|
||||||
const searchResults = await searchLearningPaths(searchQuery, language);
|
const searchResults = await learningPathService.searchLearningPaths(searchQuery, language);
|
||||||
res.json(searchResults);
|
res.json(searchResults);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
hruidList = themes.flatMap((theme) => theme.hruids);
|
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);
|
res.json(learningPaths.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
getLogger().error('❌ Unexpected error fetching learning paths:', error);
|
getLogger().error('❌ Unexpected error fetching learning paths:', error);
|
||||||
|
|
|
@ -14,8 +14,8 @@ export class Question {
|
||||||
})
|
})
|
||||||
learningObjectLanguage!: Language;
|
learningObjectLanguage!: Language;
|
||||||
|
|
||||||
@PrimaryKey({ type: 'string' })
|
@PrimaryKey({ type: 'number' })
|
||||||
learningObjectVersion: string = '1';
|
learningObjectVersion: number = 1;
|
||||||
|
|
||||||
@PrimaryKey({ type: 'integer' })
|
@PrimaryKey({ type: 'integer' })
|
||||||
sequenceNumber!: number;
|
sequenceNumber!: number;
|
||||||
|
|
|
@ -91,7 +91,7 @@ export interface FilteredLearningObject {
|
||||||
htmlUrl: string;
|
htmlUrl: string;
|
||||||
language: Language;
|
language: Language;
|
||||||
difficulty: number;
|
difficulty: number;
|
||||||
estimatedTime: number;
|
estimatedTime?: number;
|
||||||
available: boolean;
|
available: boolean;
|
||||||
teacherExclusive: boolean;
|
teacherExclusive: boolean;
|
||||||
educationalGoals: EducationalGoal[];
|
educationalGoals: EducationalGoal[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue