Example #1
0
        public async Task <ActionResult> Post([FromBody] PostCustomQuestionRequest request)
        {
            if (string.IsNullOrEmpty(request?.questionText))
            {
                return(BadRequest("Request doesn't contain the custom question text"));
            }

            var questions = await this.mediator.Send(new PostCustomQuestionQuery(request));

            return(new OkObjectResult(questions));
        }
Example #2
0
 public PostCustomQuestionQuery(PostCustomQuestionRequest request)
 {
     this._questionText      = request.questionText;
     this._classification    = request.classification;
     this._subClassification = request.subClassification;
 }