fix(backend): Testen DatabaseLearningObjectProvider gerepareerd na refactoring.
This commit is contained in:
parent
ee9afab6ca
commit
51268af79c
20 changed files with 72 additions and 210 deletions
|
@ -32,7 +32,8 @@ function convertLearningObject(learningObject: LearningObject | null): FilteredL
|
|||
educationalGoals: learningObject.educationalGoals,
|
||||
returnValue: {
|
||||
callback_url: learningObject.returnValue.callbackUrl,
|
||||
callback_schema: JSON.parse(learningObject.returnValue.callbackSchema),
|
||||
callback_schema: learningObject.returnValue.callbackSchema === "" ? ""
|
||||
: JSON.parse(learningObject.returnValue.callbackSchema),
|
||||
},
|
||||
skosConcepts: learningObject.skosConcepts,
|
||||
targetAges: learningObject.targetAges || [],
|
||||
|
|
|
@ -11,6 +11,7 @@ import {
|
|||
LearningPathIdentifier,
|
||||
LearningPathResponse,
|
||||
} from '@dwengo-1/common/interfaces/learning-content';
|
||||
import {v4} from "uuid";
|
||||
|
||||
const logger: Logger = getLogger();
|
||||
|
||||
|
@ -23,7 +24,7 @@ function filterData(data: LearningObjectMetadata): FilteredLearningObject {
|
|||
return {
|
||||
key: data.hruid, // Hruid learningObject (not path)
|
||||
_id: data._id,
|
||||
uuid: data.uuid,
|
||||
uuid: data.uuid ?? v4(),
|
||||
version: data.version,
|
||||
title: data.title,
|
||||
htmlUrl: `/learningObject/${data.hruid}/html?language=${data.language}&version=${data.version}`, // Url to fetch html content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue