Skip to content

Commit ab9449e

Browse files
committed
Add application version to root node of data.json
1 parent c9fc859 commit ab9449e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

OpenHardwareMonitor/Utilities/HttpServer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public class HttpServer
2424
private readonly HttpListener _listener;
2525
private readonly Node _root;
2626
private readonly IElement _rootElement;
27+
private readonly Version _version = typeof(HttpServer).Assembly.GetName().Version;
28+
2729
private Task _listenerTask;
2830
private CancellationTokenSource _cts;
2931

@@ -513,6 +515,7 @@ private async Task SendJsonAsync(HttpListenerResponse response, HttpListenerRequ
513515
int nodeIndex = 0;
514516

515517
json["id"] = nodeIndex++;
518+
json["Version"] = $"{_version.Major}.{_version.Minor}.{_version.Build}";
516519
json["Text"] = "Sensor";
517520
json["Min"] = "Min";
518521
json["Value"] = "Value";

0 commit comments

Comments
 (0)