refactor(backend): Linting
This commit is contained in:
parent
f537830b15
commit
2dbadc7eab
3 changed files with 20 additions and 9 deletions
|
@ -75,9 +75,14 @@ export async function createQuestion(questionDTO: QuestionDTO): Promise<Question
|
|||
|
||||
const author = mapToStudent(questionDTO.author);
|
||||
|
||||
const loId: LearningObjectIdentifier = {
|
||||
...questionDTO.learningObjectIdentifier,
|
||||
version: questionDTO.learningObjectIdentifier.version ?? 1,
|
||||
}
|
||||
|
||||
try {
|
||||
await questionRepository.createQuestion({
|
||||
loId: questionDTO.learningObjectIdentifier,
|
||||
loId,
|
||||
author,
|
||||
content: questionDTO.content,
|
||||
});
|
||||
|
@ -97,8 +102,13 @@ export async function deleteQuestion(questionId: QuestionId): Promise<QuestionDT
|
|||
return null;
|
||||
}
|
||||
|
||||
const loId : LearningObjectIdentifier = {
|
||||
...questionId.learningObjectIdentifier,
|
||||
version: questionId.learningObjectIdentifier.version ?? 1
|
||||
}
|
||||
|
||||
try {
|
||||
await questionRepository.removeQuestionByLearningObjectAndSequenceNumber(questionId.learningObjectIdentifier, questionId.sequenceNumber);
|
||||
await questionRepository.removeQuestionByLearningObjectAndSequenceNumber(loId, questionId.sequenceNumber);
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue