add basic versions of retrieving answers by question or completion

This commit is contained in:
Вячеслав 2025-05-31 01:24:48 +05:00
parent 637e6c9824
commit d73e0a104f
7 changed files with 95 additions and 16 deletions

View file

@ -69,21 +69,16 @@ public static class QuestionMapper
{
Id = questionId,
Title = dto.Title,
SurveyId = 0, // bad logic, need to do something
},
"singleanswerquestion" => new SingleAnswerQuestion
{
Id = questionId,
Title = dto.Title,
SurveyId = 0,
AnswerVariants = [],
},
"multipleanswerquestion" => new MultipleAnswerQuestion
{
Id = questionId,
Title = dto.Title,
SurveyId = 0,
AnswerVariants = []
},
_ => throw new BadRequestException("Unknown question type")
};