feat(backend): SingleTheme-pagina geïmplementeerd

This commit is contained in:
Gerald Schmittinger 2025-04-01 01:31:11 +02:00
parent a33ec6c452
commit 34f980d690
7 changed files with 137 additions and 49 deletions

View file

@ -22,6 +22,18 @@ export function useGetLearningPathQuery(
})
}
export function useGetAllLearningPathsByThemeQuery(
theme: MaybeRefOrGetter<string>
): UseQueryReturnType<LearningPath[], Error> {
return useQuery({
queryKey: [LEARNING_PATH_KEY, "getAllByTheme", theme],
queryFn: () => {
return learningPathController.getAllByTheme(toValue(theme))
},
enabled: () => Boolean(toValue(theme)),
})
}
export function useSearchLearningPathQuery(
query: MaybeRefOrGetter<string>
): UseQueryReturnType<LearningPath[], Error> {