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); }
public IActionResult Index() { List <WebsiteRequest> wr = websiteRequestDAL.GetNewWebsiteRequests(); return(View(wr)); }