Beispiel #1
0
        public ValidateAnswerResponse ValidateAnswer([FromBody] ValidateAnswerRequest validateAnswerRequest)
        {
            var res = _retroLogic.ValidateAnswer(validateAnswerRequest.QuestionId, validateAnswerRequest.GivenAnswer);

            if (res)
            {
                var cache = _retroLogic.GetCacheCorrespondingToQuestion(validateAnswerRequest.QuestionId);

                if (!cache.HasError)
                {
                    return(new ValidateAnswerResponse(cache.Data));
                }

                return(new ValidateAnswerResponse(cache.ErrorMessage));
            }

            return(new ValidateAnswerResponse(res));
        }
        public ValidateAnswerResponse ValidateAnswer([FromBody] ValidateAnswerRequest validateAnswerRequest)
        {
            var res = _retroLogic.ValidateAnswer(validateAnswerRequest.QuestionId, validateAnswerRequest.GivenAnswer);

            return(new ValidateAnswerResponse(res));
        }