Switched from self created static constant json options to a source generator options
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Moonlight.Shared
|
||||
@using Moonlight.Shared.Http
|
||||
@using Moonlight.Shared.Http.Requests
|
||||
@using Moonlight.Shared.Http.Responses
|
||||
@using Moonlight.Shared.Http.Responses.Admin.Themes
|
||||
@@ -136,7 +137,7 @@
|
||||
|
||||
var response = await HttpClient.GetFromJsonAsync<PagedData<ThemeDto>>(
|
||||
$"api/admin/themes{query}&filterOptions={filterOptions}",
|
||||
Constants.SerializerOptions
|
||||
SerializationContext.Default.Options
|
||||
);
|
||||
|
||||
return new DataGridResponse<ThemeDto>(response!.Data, response.TotalLength);
|
||||
@@ -182,7 +183,7 @@
|
||||
|
||||
var importedTheme = await response
|
||||
.Content
|
||||
.ReadFromJsonAsync<ThemeDto>(Constants.SerializerOptions);
|
||||
.ReadFromJsonAsync<ThemeDto>(SerializationContext.Default.Options);
|
||||
|
||||
if (importedTheme == null)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user