コード例 #1
0
        public IActionResult WebsiteRequests()
        {
            ObjectResult output = StatusCode(500, error.AdminError);

            if (authProvider.IsAdmin())
            {
                List <WebsiteRequest> wr = websiteRequestDAL.GetNewWebsiteRequests();

                if (wr != null)
                {
                    output = StatusCode(200, new WebsiteRequestModel(wr));
                }
            }
            else
            {
                output = StatusCode(401, error.NotAdmin);
            }

            return(output);
        }
コード例 #2
0
        public IActionResult Index()
        {
            List <WebsiteRequest> wr = websiteRequestDAL.GetNewWebsiteRequests();

            return(View(wr));
        }