Update
This commit is contained in:
@@ -25,7 +25,9 @@ public sealed class ServiceTools
|
||||
var allServices = await _client.GetServicesAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(domain))
|
||||
{
|
||||
return FormatJson(allServices);
|
||||
}
|
||||
|
||||
var filtered = allServices.EnumerateArray()
|
||||
.Where(s => s.TryGetProperty("domain", out var d) &&
|
||||
@@ -54,7 +56,9 @@ public sealed class ServiceTools
|
||||
: JsonSerializer.Deserialize<Dictionary<string, object>>(serviceData) ?? [];
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(entityId))
|
||||
{
|
||||
dataDict["entity_id"] = entityId;
|
||||
}
|
||||
|
||||
data = JsonSerializer.SerializeToElement(dataDict);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user