Add shared pagination, projections and ownership helpers; simplify query and command handlers

This commit is contained in:
2026-09-24 11:59:34 +02:00
parent 5a0f82b77b
commit 4b147d9ee3
84 changed files with 547 additions and 767 deletions
@@ -23,7 +23,7 @@ public static class TrackEndpoints
.AddEndpointFilter<ValidationFilter<PageQuery>>()
.WithName("GetTracks")
.WithSummary("Get Paginated Tracks, Optionally Filtered By Name And Genre.")
.Produces<TracksSearchResponse>()
.Produces<PaginatedResponse<TrackApplicationResponse>>()
.ProducesValidationProblem();
group.MapGet("/{id}", GetTrackById)
@@ -116,7 +116,7 @@ public static class TrackEndpoints
}
var result = await mediator.Send(new GetTracksQuery(name, page.PageNumber, page.PageSize, parsedGenre), cancellationToken);
return result.ToHttpResult();
return Results.Ok(result);
}
private static async Task<IResult> GetTrackById(