View blog posts

This commit is contained in:
Robert Marshall 2019-04-28 11:12:52 +01:00
parent b8f371e3e8
commit 3064dd8d25
5 changed files with 16 additions and 13 deletions

View file

@ -28,9 +28,9 @@ namespace Website.Controllers
return View(model);
}
public async Task<IActionResult> View(int id)
public async Task<IActionResult> Entry(string url)
{
var post = await _repo.GetPostAsync(id);
var post = await _repo.GetPostByUrlAsync(url);
var model = new BlogPostViewModel(post);
return View(model);
}