fix: merge + types frontend controller

This commit is contained in:
Gabriellvl 2025-04-02 12:21:04 +02:00
parent 4ca568e738
commit 8ceed7f779
20 changed files with 129 additions and 92 deletions

View file

@ -1,11 +1,13 @@
import { getAnswerRepository, getQuestionRepository } from '../data/repositories.js';
import {mapToQuestionDTO, mapToQuestionDTOId, QuestionDTO, QuestionId} from '../interfaces/question.js';
import {mapToQuestionDTO, mapToQuestionDTOId } from '../interfaces/question.js';
import { Question } from '../entities/questions/question.entity.js';
import { Answer } from '../entities/questions/answer.entity.js';
import { AnswerDTO, AnswerId, mapToAnswerDTO, mapToAnswerDTOId } from '../interfaces/answer.js';
import {mapToAnswerDTO, mapToAnswerDTOId} from '../interfaces/answer.js';
import { QuestionRepository } from '../data/questions/question-repository.js';
import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js';
import { mapToStudent } from '../interfaces/student.js';
import {QuestionDTO, QuestionId} from "dwengo-1-common/src/interfaces/question";
import {AnswerDTO, AnswerId} from "dwengo-1-common/src/interfaces/answer";
export async function getAllQuestions(id: LearningObjectIdentifier, full: boolean): Promise<QuestionDTO[] | QuestionId[]> {
const questionRepository: QuestionRepository = getQuestionRepository();