refactor(backend): Preparation for learning content from multiple data sources.
Refactored the service layer so that it becomes possible to add another source for learning objects and learning paths.
This commit is contained in:
parent
8c22b72b22
commit
d7728ddd03
10 changed files with 219 additions and 117 deletions
|
@ -3,9 +3,9 @@ import {
|
|||
getLearningObjectById,
|
||||
getLearningObjectIdsFromPath,
|
||||
getLearningObjectsFromPath,
|
||||
} from '../services/learningObjects.js';
|
||||
} from '../services/learning-content/dwengo-api/dwengo-api-learning-object-provider.js';
|
||||
import { FALLBACK_LANG } from '../config.js';
|
||||
import { FilteredLearningObject } from '../interfaces/learningPath';
|
||||
import { FilteredLearningObject } from '../interfaces/learningContent';
|
||||
|
||||
export async function getAllLearningObjects(
|
||||
req: Request,
|
||||
|
|
|
@ -4,7 +4,7 @@ import { FALLBACK_LANG } from '../config.js';
|
|||
import {
|
||||
fetchLearningPaths,
|
||||
searchLearningPaths,
|
||||
} from '../services/learningPaths.js';
|
||||
} from '../services/learning-content/dwengo-api/dwengo-api-learning-path-provider.js';
|
||||
/**
|
||||
* Fetch learning paths based on query parameters.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue