Plain text instead of JSON
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user