mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
Migrate GetPlatformStatsFunction to IMetricsRepository
Completes non-Vulnerability function migrations. Remaining 14 files still using TableStorageService are: 8 Vulnerability functions (use GetTableClient), ReseedFromGitHub, ApiKeyManagement, BlockedDevice/VersionService, SessionReportService, ApiKeyMiddleware — these need interface additions first. https://claude.ai/code/session_01NHWJfPaa8TQHuPzMD7gG63
This commit is contained in:
+4
-4
@@ -13,12 +13,12 @@ namespace AutopilotMonitor.Functions.Functions.Metrics
|
||||
public class GetPlatformStatsFunction
|
||||
{
|
||||
private readonly ILogger<GetPlatformStatsFunction> _logger;
|
||||
private readonly TableStorageService _storageService;
|
||||
private readonly IMetricsRepository _metricsRepo;
|
||||
|
||||
public GetPlatformStatsFunction(ILogger<GetPlatformStatsFunction> logger, TableStorageService storageService)
|
||||
public GetPlatformStatsFunction(ILogger<GetPlatformStatsFunction> logger, IMetricsRepository metricsRepo)
|
||||
{
|
||||
_logger = logger;
|
||||
_storageService = storageService;
|
||||
_metricsRepo = metricsRepo;
|
||||
}
|
||||
|
||||
[Function("GetPlatformStats")]
|
||||
@@ -27,7 +27,7 @@ namespace AutopilotMonitor.Functions.Functions.Metrics
|
||||
{
|
||||
try
|
||||
{
|
||||
var stats = await _storageService.GetPlatformStatsAsync();
|
||||
var stats = await _metricsRepo.GetPlatformStatsAsync();
|
||||
|
||||
var response = req.CreateResponse(HttpStatusCode.OK);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user