Merge remote-tracking branch 'origin/refactor/common' into feat/user-routes-test-interface-refactor
# Conflicts: # backend/src/controllers/students.ts # backend/src/controllers/teachers.ts # backend/src/interfaces/answer.ts # backend/src/interfaces/question.ts # backend/src/interfaces/student.ts # backend/src/services/classes.ts # backend/src/services/questions.ts # backend/src/services/students.ts # backend/src/services/teachers.ts
This commit is contained in:
commit
4ca568e738
57 changed files with 270 additions and 190 deletions
|
@ -1,14 +1,6 @@
|
|||
import { Question } from '../entities/questions/question.entity.js';
|
||||
import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js';
|
||||
import { mapToStudentDTO, StudentDTO } from './student.js';
|
||||
|
||||
export interface QuestionDTO {
|
||||
learningObjectIdentifier: LearningObjectIdentifier;
|
||||
sequenceNumber?: number;
|
||||
author: StudentDTO;
|
||||
timestamp?: string;
|
||||
content: string;
|
||||
}
|
||||
import { mapToStudentDTO } from './student.js';
|
||||
import { QuestionDTO, QuestionId } from 'dwengo-1-common/src/interfaces/question';
|
||||
|
||||
function getLearningObjectIdentifier(question: Question): LearningObjectIdentifier {
|
||||
return {
|
||||
|
@ -33,11 +25,6 @@ export function mapToQuestionDTO(question: Question): QuestionDTO {
|
|||
};
|
||||
}
|
||||
|
||||
export interface QuestionId {
|
||||
learningObjectIdentifier: LearningObjectIdentifier;
|
||||
sequenceNumber: number;
|
||||
}
|
||||
|
||||
export function mapToQuestionDTOId(question: Question): QuestionId {
|
||||
const learningObjectIdentifier = getLearningObjectIdentifier(question);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue