예제 #1
0
        public IHttpActionResult GetProblemDetials(int Id)
        {
            if (!user_service.IsAuthorizedToViewProblem(Id))
            {
                return(Unauthorized());
            }

            try{
                ProblemDetails problem = problem_repository.GetProblemDetails(Id);
                return(Ok(problem));
            }
            catch (ObjectNotFoundException e) {
                return(NotFound());
            }
        }