Send game filter dtos

This commit is contained in:
Maxime Adler
2025-04-17 16:28:31 +02:00
parent e192df49e7
commit 33cdfa2841
17 changed files with 137 additions and 40 deletions

View File

@@ -1,4 +1,5 @@
using GameIdeas.Shared.Dto;
using GameIdeas.BlazorApp.Helpers;
using GameIdeas.Shared.Dto;
namespace GameIdeas.BlazorApp.Shared.Constants;
@@ -7,8 +8,7 @@ public static class Endpoints
public static class Game
{
public static readonly string Create = "api/Game/Create";
public static string Fetch(PaggingDto pagging) =>
$"api/Game?{nameof(pagging.CurrentPage)}={pagging.CurrentPage}&{nameof(pagging.NumberPerPage)}={pagging.NumberPerPage}";
public static string Fetch(GameFilterDto filter) => $"api/Game?{UrlHelper.BuildUrlParams(filter)}";
}
public static class Category