public ActionResult ViewLegacyAttachment(int?postId) { if (postId == null) { return(HttpNotFound()); } var article = ArticleModel.GetArticleByLegacyPost((int)postId); if (article == null) { return(RedirectPermanent(string.Format("https://{0}/forums/{1}/PostAttachment.aspx", Config.NodeBB.Host, postId))); } return(RedirectToActionPermanent("ViewArticle", new { articleSlug = article.Slug })); }
public ActionResult ViewLegacyPost(int?postId) { if (postId == null) { return(HttpNotFound()); } var article = ArticleModel.GetArticleByLegacyPost((int)postId); if (article == null) { return(HttpNotFound()); } return(RedirectToActionPermanent("ViewArticle", new { articleSlug = article.Slug })); }