From 2df9d93e9294b2558829593adea38093b2cfd1a6 Mon Sep 17 00:00:00 2001 From: glax Date: Fri, 17 Oct 2025 01:04:31 +0200 Subject: [PATCH] order actions by time descending --- API/Controllers/ActionsController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/API/Controllers/ActionsController.cs b/API/Controllers/ActionsController.cs index 7054ed1..ca9f06c 100644 --- a/API/Controllers/ActionsController.cs +++ b/API/Controllers/ActionsController.cs @@ -40,7 +40,8 @@ public class ActionsController(ActionsContext context) : Controller if (await context.FilterActions(filter.MangaId, filter.ChapterId) .Where(a => filter.Start == null || a.PerformedAt >= filter.Start.Value.ToUniversalTime()) .Where(a => filter.End == null || a.PerformedAt <= filter.End.Value.ToUniversalTime()) - .Where(a => filter.Action == null || a.Action == filter.Action) + .Where(a => filter.Action == null || a.Action == filter.Action) + .OrderByDescending(a => a.PerformedAt) .ToListAsync(HttpContext.RequestAborted) is not { } actions) return TypedResults.InternalServerError();