delete answer variants for logic rework
This commit is contained in:
parent
dc6bca6b6e
commit
c39fd4192a
4 changed files with 13 additions and 7 deletions
|
|
@ -30,13 +30,13 @@ public static class QuestionMapper
|
|||
{
|
||||
Title = dto.Title,
|
||||
SurveyId = surveyId,
|
||||
AnswerVariants = dto.AnswerVariants?.Select(v => new AnswerVariant { Text = v }).ToList() ?? [],
|
||||
AnswerVariants = [],
|
||||
},
|
||||
"multipleanswerquestion" => new MultipleAnswerQuestion
|
||||
{
|
||||
Title = dto.Title,
|
||||
SurveyId = surveyId,
|
||||
AnswerVariants = dto.AnswerVariants?.Select(v => new AnswerVariant { Text = v }).ToList() ?? []
|
||||
AnswerVariants = []
|
||||
},
|
||||
_ => throw new BadRequestException("Unknown question type")
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue