diff --git a/src/Backend/AutopilotMonitor.Functions/Functions/Metrics/GetPlatformStatsFunction.cs b/src/Backend/AutopilotMonitor.Functions/Functions/Metrics/GetPlatformStatsFunction.cs index 9bd94aba..8599f497 100644 --- a/src/Backend/AutopilotMonitor.Functions/Functions/Metrics/GetPlatformStatsFunction.cs +++ b/src/Backend/AutopilotMonitor.Functions/Functions/Metrics/GetPlatformStatsFunction.cs @@ -13,12 +13,12 @@ namespace AutopilotMonitor.Functions.Functions.Metrics public class GetPlatformStatsFunction { private readonly ILogger _logger; - private readonly TableStorageService _storageService; + private readonly IMetricsRepository _metricsRepo; - public GetPlatformStatsFunction(ILogger logger, TableStorageService storageService) + public GetPlatformStatsFunction(ILogger 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);