refactor: get author using BlogService
This commit is contained in:
parent
3c62a42d32
commit
6b18b36b96
|
@ -7,7 +7,7 @@
|
|||
|
||||
@foreach (BlogPost post in BlogService.AllPosts)
|
||||
{
|
||||
Author? author = Model.GetAuthor(post);
|
||||
BlogService.TryGetAuthor(post, out Author? author);
|
||||
DateTimeOffset published = post.Published;
|
||||
DateTimeOffset timestamp = post.Updated ?? published;
|
||||
bool isUpdated = post.Updated.HasValue;
|
||||
|
|
Loading…
Reference in New Issue