예제 #1
0
        public IHttpActionResult GetProblemList()
        {
            if (!user_service.IsAuthorizedToViewAllProblemList())
            {
                return(Unauthorized());
            }

            var problems = problem_repository.GetAllProblemsList();

            return(Ok(ProblemListItem.MapTo(problems)));
        }