Exemplo n.º 1
0
        public IHttpActionResult GetQuestionsBySurveyIdReduced([FromUri] int surveyId)
        {
            if (surveyId <= 0)
            {
                return(Content(HttpStatusCode.BadRequest, new ErrorResponse(Errors.INVALID_SURVEY_ID)));
            }
            var result = _questionManager.GetQuestionsBySurveyIdReduced(surveyId, out Errors resultCode);

            if (result == null)
            {
                return(Content(HttpStatusCode.BadRequest, new ErrorResponse(resultCode)));
            }

            return(Content(HttpStatusCode.OK, result));
        }