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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user