Changed deserialize type to DataTable

This commit is contained in:
2025-06-11 17:05:59 +03:30
parent de7f960603
commit 507c0364d3

View File

@@ -1,3 +1,4 @@
using System.Data;
using Microsoft.AspNetCore.WebUtilities; using Microsoft.AspNetCore.WebUtilities;
using Newtonsoft.Json; using Newtonsoft.Json;
using PdfService; using PdfService;
@@ -32,7 +33,7 @@ app.MapPost("/Print", async (HttpContext context) =>
{ {
if (part.ContentType == "application/json") if (part.ContentType == "application/json")
{ {
data = JsonConvert.DeserializeObject(part.Content); data = JsonConvert.DeserializeObject<DataTable>(part.Content);
} }
else if (part.ContentType == "application/xml") else if (part.ContentType == "application/xml")
{ {