From 00b422b8f3f33e99d305b0118cfc6a1723b8524f Mon Sep 17 00:00:00 2001 From: shept Date: Sun, 8 Jun 2025 14:51:52 +0500 Subject: [PATCH] fix 500 on question update --- .../SurveyBackend.API/Controllers/QuestionController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SurveyBackend/SurveyBackend.API/Controllers/QuestionController.cs b/SurveyBackend/SurveyBackend.API/Controllers/QuestionController.cs index 9f1b5dc..670bb54 100644 --- a/SurveyBackend/SurveyBackend.API/Controllers/QuestionController.cs +++ b/SurveyBackend/SurveyBackend.API/Controllers/QuestionController.cs @@ -70,8 +70,8 @@ public class QuestionController : ControllerBase { var question = QuestionMapper.QuestionUpdateToModel(dto, id); await _questionService.UpdateQuestionAsync(question); - var result = QuestionMapper.ModelToQuestionDto(question); - return Ok(result); + var updatedQuestion = await _questionService.GetQuestionByIdAsync(id); + return Ok(updatedQuestion); } ///