fix(backend): Foute entity-structuur van leerpaden verbeterd.
Ook testen geschreven voor LearningPathRepository en LearningObjectRepository.
This commit is contained in:
parent
4d999c78ba
commit
1417907933
24 changed files with 474 additions and 64 deletions
|
@ -2,10 +2,10 @@ import {getAttachmentRepository} from "../../data/repositories";
|
|||
import {Attachment} from "../../entities/content/attachment.entity";
|
||||
import {LearningObjectIdentifier} from "../../interfaces/learning-content";
|
||||
|
||||
const attachmentRepo = getAttachmentRepository();
|
||||
|
||||
const attachmentService = {
|
||||
getAttachment(learningObjectId: LearningObjectIdentifier, attachmentName: string): Promise<Attachment | null> {
|
||||
const attachmentRepo = getAttachmentRepository();
|
||||
|
||||
if (learningObjectId.version) {
|
||||
return attachmentRepo.findByLearningObjectIdAndName({
|
||||
hruid: learningObjectId.hruid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue