public IHttpActionResult GetProblemList() { if (!user_service.IsAuthorizedToViewAllProblemList()) { return(Unauthorized()); } var problems = problem_repository.GetAllProblemsList(); return(Ok(ProblemListItem.MapTo(problems))); }