public async Task<ActionResult> SinglePost(int year, int month, int day, string postname) { var postHandler = new PostsHandler(SiteConfig.POSTS_WEBAPI_ADDRESS, _webCache); var result = await postHandler.GetPost(year, month, day, postname); if (!result.HasValue) { throw new jcBPWebException(result.Exception, result.ErrorCode); } return View(result.ReturnValue); }
public async Task<ActionResult> Index(int? pageNumber = null) { var postHandler = new PostsHandler(SiteConfig.POSTS_WEBAPI_ADDRESS, _webCache); var result = await postHandler.GetMainListing(SiteConfig.SITE_POST_PAGE_SIZE, pageNumber); if (!result.HasValue) { throw new jcBPWebException(result.Exception, result.ErrorCode); } return View(result.ReturnValue); }