From 8ea6345a5aa934774ef5fc1a7a61456667c638b0 Mon Sep 17 00:00:00 2001 From: Mark Downie Date: Sun, 28 Nov 2021 18:24:29 -0500 Subject: [PATCH] Incorrectly udpating the Entry values which impacted the cache. --- .../Controllers/ArchiveController.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/source/DasBlog.Web.UI/Controllers/ArchiveController.cs b/source/DasBlog.Web.UI/Controllers/ArchiveController.cs index 3cdb13af..0e92c79e 100644 --- a/source/DasBlog.Web.UI/Controllers/ArchiveController.cs +++ b/source/DasBlog.Web.UI/Controllers/ArchiveController.cs @@ -80,8 +80,6 @@ public IActionResult ArchiveAll() archiveManager.GetEntriesForYear(new DateTime(year, 1, 1) , languageFilter).OrderByDescending(x => x.CreatedUtc)); } - entries = DateModification(entries); - var alvm = new ArchiveListViewModel(); foreach (var i in entries.ToList().Select(entry => mapper.Map(entry)).ToList()) @@ -127,20 +125,8 @@ private List GetMonthsViewModel(DateTime dateTime, bool whol stopWatch.Stop(); logger.LogInformation(new DasBlog.Services.ActivityLogs.EventDataItem(EventCodes.Site, null, $"ArchiveController (Date: {dateTime.ToLongDateString()}; Year: {wholeYear}) Time elapsed: {stopWatch.Elapsed.TotalMilliseconds}ms")); - entries = DateModification(entries); - DefaultPage(ARCHIVE); return MonthViewViewModel.Create(dateTime, entries, mapper); } - - private EntryCollection DateModification(EntryCollection coll) - { - foreach (var entry in coll) - { - entry.CreatedUtc = dasBlogSettings.GetDisplayTime(entry.CreatedUtc); - } - - return coll; - } } }