Plain text instead of JSON
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s

This commit is contained in:
2025-08-21 15:13:18 +02:00
parent 85cf55f878
commit c62dc22245

View File

@@ -1,3 +1,4 @@
using System.Text;
using System.Text.Json; using System.Text.Json;
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.Cookies;
@@ -403,13 +404,18 @@ app.MapGet("/Status", async ([FromServices] ILogger<Configurator> logger, [FromS
HttpResponseMessage responseMessage = await client.GetAsync($"/api/1/vehicles/{vin}/fleet_telemetry_errors"); HttpResponseMessage responseMessage = await client.GetAsync($"/api/1/vehicles/{vin}/fleet_telemetry_errors");
string response = await responseMessage.Content.ReadAsStringAsync(); string response = await responseMessage.Content.ReadAsStringAsync();
logger.LogInformation("Telemetry errors: {response}", response); logger.LogInformation("Telemetry errors: {response}", response);
StringBuilder sb = new StringBuilder();
sb.AppendLine("Fleet status:");
sb.AppendLine(statusResponseContent);
sb.AppendLine();
sb.AppendLine("Telemetry config:");
sb.AppendLine(rsp);
sb.AppendLine();
sb.AppendLine("Telemetry errors:");
sb.AppendLine(response);
return Results.Ok(JsonSerializer.Serialize(new return Results.Ok(sb.ToString());
{
FleetStatus = statusResponseContent,
TelemetryConfig = rsp,
TelemetryErrors = response
}));
}); });
//Map static assets //Map static assets