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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user