public IHttpActionResult Get() { var feed = _feedHelper.GetLatestFeed(); if (feed == null) { return(Content(HttpStatusCode.NotFound, "No feed generated", new NamespacedXmlMediaTypeFormatter())); } return(Content(HttpStatusCode.OK, feed, new NamespacedXmlMediaTypeFormatter())); }
public IHttpActionResult Get() { var siteHost = HttpContext.Current.Request.Url.Host; var feed = _feedHelper.GetLatestFeed(siteHost); if (feed == null) { return(Content(HttpStatusCode.NotFound, "No feed generated", new NamespacedXmlMediaTypeFormatter())); } feed.Entries = feed.Entries.Where(e => e.Link.Contains(Request.RequestUri.Host)).ToList(); return(Content(HttpStatusCode.OK, feed, new NamespacedXmlMediaTypeFormatter())); }