feat(backend): Added endpoint to fetch HTML version of learning object (from Dwengo backend)
Also refactored a bit to make this easier.
This commit is contained in:
parent
770c5c9879
commit
18ee991ce3
16 changed files with 264 additions and 178 deletions
|
@ -27,7 +27,7 @@ const dwengoApiLearningPathProvider: LearningPathProvider = {
|
|||
const learningPaths = await fetchWithLogging<LearningPath[]>(
|
||||
apiUrl,
|
||||
`Learning paths for ${source}`,
|
||||
params
|
||||
{ params }
|
||||
);
|
||||
|
||||
if (!learningPaths || learningPaths.length === 0) {
|
||||
|
@ -56,7 +56,7 @@ const dwengoApiLearningPathProvider: LearningPathProvider = {
|
|||
const searchResults = await fetchWithLogging<LearningPath[]>(
|
||||
apiUrl,
|
||||
`Search learning paths with query "${query}"`,
|
||||
params
|
||||
{ params }
|
||||
);
|
||||
return searchResults ?? [];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue