feat: answer routes en put question
This commit is contained in:
		
							parent
							
								
									6a1adb0ee3
								
							
						
					
					
						commit
						e8e2466b76
					
				
					 12 changed files with 288 additions and 62 deletions
				
			
		|  | @ -1,14 +1,14 @@ | |||
| import { mapToUserDTO } from './user.js'; | ||||
| import { mapToQuestionDTO, mapToQuestionDTOId } from './question.js'; | ||||
| import {mapToQuestionDTO, mapToQuestionDTOId} from './question.js'; | ||||
| import { Answer } from '../entities/questions/answer.entity.js'; | ||||
| import { AnswerDTO, AnswerId } from '@dwengo-1/common/interfaces/answer'; | ||||
| import {mapToTeacherDTO} from "./teacher"; | ||||
| 
 | ||||
| /** | ||||
|  * Convert a Question entity to a DTO format. | ||||
|  */ | ||||
| export function mapToAnswerDTO(answer: Answer): AnswerDTO { | ||||
|     return { | ||||
|         author: mapToUserDTO(answer.author), | ||||
|         author: mapToTeacherDTO(answer.author), | ||||
|         toQuestion: mapToQuestionDTO(answer.toQuestion), | ||||
|         sequenceNumber: answer.sequenceNumber!, | ||||
|         timestamp: answer.timestamp.toISOString(), | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| import { Question } from '../entities/questions/question.entity.js'; | ||||
| import { mapToStudentDTO } from './student.js'; | ||||
| import { QuestionDTO, QuestionId } from '@dwengo-1/common/interfaces/question'; | ||||
| import { mapToStudentDTO} from './student.js'; | ||||
| import { QuestionDTO, QuestionId} from '@dwengo-1/common/interfaces/question'; | ||||
| import { LearningObjectIdentifierDTO } from '@dwengo-1/common/interfaces/learning-content'; | ||||
| import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js'; | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue
	
	 Gabriellvl
						Gabriellvl