Exemple #1
0
        public async Task <IActionResult> AddOuestionToSurvey(int id, [FromBody] QuestionDTO question)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest() as IActionResult);
            }
            var result = await service.AddQuestionToSurveyAsync(id, question);

            return(result != null?Ok(result) as IActionResult : BadRequest() as IActionResult);
        }