Switched from self created static constant json options to a source generator options
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Moonlight.Frontend.UI.Admin.Modals
|
||||
@using Moonlight.Shared
|
||||
@using Moonlight.Shared.Http
|
||||
@using Moonlight.Shared.Http.Requests
|
||||
@using Moonlight.Shared.Http.Responses
|
||||
@using Moonlight.Shared.Http.Responses.Admin
|
||||
@@ -123,7 +124,7 @@
|
||||
|
||||
var response = await HttpClient.GetFromJsonAsync<PagedData<RoleDto>>(
|
||||
$"api/admin/roles{query}&filterOptions={filterOptions}",
|
||||
Constants.SerializerOptions
|
||||
SerializationContext.Default.Options
|
||||
);
|
||||
|
||||
return new DataGridResponse<RoleDto>(response!.Data, response.TotalLength);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Moonlight.Frontend.UI.Admin.Modals
|
||||
@using Moonlight.Shared
|
||||
@using Moonlight.Shared.Http
|
||||
@using ShadcnBlazor.Buttons
|
||||
@using ShadcnBlazor.DataGrids
|
||||
@using ShadcnBlazor.Dropdowns
|
||||
@@ -121,7 +122,7 @@
|
||||
|
||||
var response = await HttpClient.GetFromJsonAsync<PagedData<UserDto>>(
|
||||
$"api/admin/users{query}&filterOptions={filterOptions}",
|
||||
Constants.SerializerOptions
|
||||
SerializationContext.Default.Options
|
||||
);
|
||||
|
||||
return new DataGridResponse<UserDto>(response!.Data, response.TotalLength);
|
||||
|
||||
Reference in New Issue
Block a user