View blog posts
This commit is contained in:
parent
b8f371e3e8
commit
3064dd8d25
5 changed files with 16 additions and 13 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue