Ejemplo n.º 1
0
        public async Task <IActionResult> UpdateQuestion(string id, QuestionRequestModel model)
        {
            var userId = User.Claims.First(u => u.Type.Equals("sub")).Value;

            var newQuestion = await _questionManager.UpdateQuestionAsync(id, model, userId);

            var response = new ResponseModel <QuestionResponseModel>(newQuestion, true, "Question created successfully");

            return(Ok(response));
        }
Ejemplo n.º 2
0
 public async Task Put(QuestionDto questionDto)
 {
     await _questionManager.UpdateQuestionAsync(questionDto); //TODO: return an empty 201
 }