fix(api): align IStatsService with ServiceResult pattern and fix activeSites bug

IStatsService was the only service returning raw Task<T> instead of
ServiceResult<T>. Also fixed 'activeSites = totalSites' copy-paste
bug — now counts sites where Enabled == true.
This commit is contained in:
Arnaud Dartois committed 2026-07-17 19:28:02 +00:00
1 parent 88d7cd79f8
commit 21642bc4d6
3 files changed
+9 -6

No files matched your search

@@ -18,7 +18,7 @@ public class StatsController : ControllerBase
[HttpGet]
public async Task<IActionResult> GetStats(CancellationToken ct)
{
var stats = await _statsService.GetStatsAsync(ct);
return Ok(new { data = stats, timestamp = DateTime.UtcNow });
var result = await _statsService.GetStatsAsync(ct);
return Ok(new { data = result.Data, timestamp = DateTime.UtcNow });
}
}