filter time to utc

This commit is contained in:
2025-10-16 23:41:48 +02:00
parent f1805231c6
commit 0c49ca7bed

View File

@@ -38,8 +38,8 @@ public class ActionsController(ActionsContext context) : Controller
public async Task<Results<Ok<IEnumerable<ActionRecord>>, InternalServerError>> GetActionsInterval([FromBody]Filter filter) public async Task<Results<Ok<IEnumerable<ActionRecord>>, InternalServerError>> GetActionsInterval([FromBody]Filter filter)
{ {
if (await context.Filter(filter.MangaId, filter.ChapterId) if (await context.Filter(filter.MangaId, filter.ChapterId)
.Where(a => filter.Start == null || a.PerformedAt >= filter.Start) .Where(a => filter.Start == null || a.PerformedAt >= filter.Start.Value.ToUniversalTime())
.Where(a => filter.End == null || a.PerformedAt >= filter.End) .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)
.ToListAsync(HttpContext.RequestAborted) is not { } actions) .ToListAsync(HttpContext.RequestAborted) is not { } actions)
return TypedResults.InternalServerError(); return TypedResults.InternalServerError();