james URL configuration refactoring
This commit is contained in:
@@ -61,12 +61,14 @@ public class HeartbeatBackgroundTask
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = _configuration.HeartbeatApiUrl;
|
||||
var apiKey = _configuration.PrinterServerKey;
|
||||
var url = _configuration.ApiUrl != null
|
||||
? $"{_configuration.ApiUrl.TrimEnd('/')}/api/printerServer/heartbeat"
|
||||
: null;
|
||||
var apiKey = _configuration.ApiKey;
|
||||
|
||||
if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(apiKey))
|
||||
{
|
||||
_logger.LogWarning("Heartbeat not configured (missing HeartbeatApiUrl or PrinterServerKey)");
|
||||
_logger.LogWarning("Heartbeat not configured (missing ApiUrl or ApiKey)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
"GroupId": "63e37295bd6f26dbd36164c0",
|
||||
"RestaurantId": "63e37295bd6f26dbd36164c0",
|
||||
"ApiKey": "Pd8X/VtXLWgl5Djy4ksjdHC3xboeoh5Jig3Qo4277GQ=",
|
||||
"ApiUrl": "https://api.dev.gastrojames.ch",
|
||||
"PrinterConfigurations": {}
|
||||
}
|
||||
Reference in New Issue
Block a user