Skip to content

Commit

Permalink
Incorrectly udpating the Entry values which impacted the cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
poppastring committed Nov 28, 2021
1 parent db3a56c commit 8ea6345
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions source/DasBlog.Web.UI/Controllers/ArchiveController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PostViewModel>(entry)).ToList())
Expand Down Expand Up @@ -127,20 +125,8 @@ private List<MonthViewViewModel> 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;
}
}
}

0 comments on commit 8ea6345

Please sign in to comment.