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];
|
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
|
int statusCode = firstError.Type switch
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public class PointsController(
|
|||||||
|
|
||||||
PointResponse[] points = [
|
PointResponse[] points = [
|
||||||
.. query
|
.. query
|
||||||
|
.OrderBy(i => i.Id)
|
||||||
.Skip((request.Page - 1) * request.Count)
|
.Skip((request.Page - 1) * request.Count)
|
||||||
.Take(request.Count)
|
.Take(request.Count)
|
||||||
.Select(point => MapPointResponse(point))
|
.Select(point => MapPointResponse(point))
|
||||||
|
|||||||
Reference in New Issue
Block a user