1
0
mirror of https://github.com/XFox111/MuiCharts.git synced 2026-04-22 06:51:05 +03:00

Minor fixes and refactoring

This commit is contained in:
2024-02-22 14:56:32 +00:00
parent 39bc85c9d9
commit af7d4e0ec9
2 changed files with 5 additions and 4 deletions
@@ -37,7 +37,7 @@ public abstract class ApiControllerBase<T>(ILogger<T> logger)
Error firstError = errors[0];
Logger.LogError("An error occured during request processing: {Error}", firstError);
Logger.LogWarning("An error occured during request processing: {Error}", firstError);
int statusCode = firstError.Type switch
{
@@ -103,9 +103,10 @@ public class PointsController(
PointResponse[] points = [
.. query
.Skip((request.Page - 1) * request.Count)
.Take(request.Count)
.Select(point => MapPointResponse(point))
.OrderBy(i => i.Id)
.Skip((request.Page - 1) * request.Count)
.Take(request.Count)
.Select(point => MapPointResponse(point))
];
GetPointsResponse response = new(