Enables location and gear testing via API
All checks were successful
Build, Push and Run Container / build (push) Successful in 27s

Adds query parameters for latitude and longitude to the `/TestStartParking` endpoint, allowing to simulate different locations.

Adds logic to set the gear to "P" if the received value is null to cover edge cases.

Ensures asynchronous message processing by awaiting the result of ProcessMessage to prevent potential race conditions.
This commit is contained in:
2025-08-25 08:49:57 +02:00
parent c44f0d327d
commit 22df381755
3 changed files with 6 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ public class MQTTClient : IHostedService
string? message = Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
logger.LogInformation("Message received: {Message}", message);
messageProcessor.ProcessMessage(vin, field.ToLowerInvariant(), message.StripQuotes());
messageProcessor.ProcessMessage(vin, field.ToLowerInvariant(), message.StripQuotes()).GetAwaiter().GetResult();
}
else
logger.LogWarning("Topic not passed to message processor: {Topic}", topic);