예제 #1
0
        public ActionResult <PagedResult <ExaminationResponse> > GetExaminations([FromQuery] string password,
                                                                                 [FromQuery] int page,
                                                                                 [FromQuery] int count,
                                                                                 [FromQuery] double[] age,
                                                                                 [FromQuery] Gender?gender,
                                                                                 [FromQuery] Consistency[] consistency,
                                                                                 [FromQuery] double[] ph,
                                                                                 [FromQuery] ExaminationStatus[] akkermansiaMuciniphila,
                                                                                 [FromQuery] ExaminationStatus[] faecalibactriumPrausnitzii)
        {
            try
            {
                var service      = new ExaminationService(password, "5432");
                var examinations = service.GetAllExaminations(page, count, gender, age, ph, consistency, akkermansiaMuciniphila, faecalibactriumPrausnitzii);

                return(examinations);
            }
            catch (AuthorizationException)
            {
                return(Unauthorized());
            }
        }