From 5396097ee12a643f62741c44fd945484f3712ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20S=C3=A1nchez?= Date: Wed, 29 Jul 2026 11:30:15 -0600 Subject: [PATCH] feat[backend](ingestion_stats): fixed default time window for ingestion stats --- backend/modules/eventprocessing/usecase/ingestion_stats.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/modules/eventprocessing/usecase/ingestion_stats.go b/backend/modules/eventprocessing/usecase/ingestion_stats.go index 7e8fce0e3..f0802c7e8 100644 --- a/backend/modules/eventprocessing/usecase/ingestion_stats.go +++ b/backend/modules/eventprocessing/usecase/ingestion_stats.go @@ -13,7 +13,7 @@ import ( var ErrInvalidStatsParam = errors.New("invalid ingestion-stats parameter") const ( - defaultStatsWindow = 24 * time.Hour + defaultStatsWindow = "24h" defaultTop = 100 maxTop = 1000 ) @@ -132,7 +132,7 @@ func resolveStatus(status string) (string, string, error) { // resolveWindow defaults to the last 24h when from/to are absent (RFC3339). func resolveWindow(from, to string) (string, string) { if to == "" { to = "now" } - if from == "" { from = "now-" + defaultStatsWindow.String() } + if from == "" { from = "now-" + defaultStatsWindow } return from, to }