From 6b18b36b96d4c71dceef64be034dbba4fe985f16 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 8 Aug 2023 11:34:41 +0100 Subject: [PATCH] refactor: get author using BlogService --- OliverBooth/Pages/Blog/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliverBooth/Pages/Blog/Index.cshtml b/OliverBooth/Pages/Blog/Index.cshtml index c968455..015f6d8 100644 --- a/OliverBooth/Pages/Blog/Index.cshtml +++ b/OliverBooth/Pages/Blog/Index.cshtml @@ -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;