From 47839730d7bf95f0c4ffde26b5a5a6215d2beea2 Mon Sep 17 00:00:00 2001 From: Alex Luong Date: Tue, 3 Feb 2026 20:54:43 +0700 Subject: [PATCH 1/2] chore: list attempt query comment --- internal/apirouter/log_handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/apirouter/log_handlers.go b/internal/apirouter/log_handlers.go index 8f90c988..3b81478a 100644 --- a/internal/apirouter/log_handlers.go +++ b/internal/apirouter/log_handlers.go @@ -181,7 +181,7 @@ func toAPIAttempt(ar *logstore.AttemptRecord, opts IncludeOptions) APIAttempt { } // ListAttempts handles GET /attempts -// Query params: tenant_id, event_id, destination_id, status, topic[], start, end, limit, next, prev, expand[], sort_order +// Query params: tenant_id, event_id, destination_id, status, topic[], time[gte], time[lte], time[gt], time[lt], limit, next, prev, include, order_by, dir func (h *LogHandlers) ListAttempts(c *gin.Context) { // Authz: JWT users can only query their own tenant's attempts tenantID, ok := resolveTenantIDFilter(c) @@ -359,7 +359,7 @@ func (h *LogHandlers) RetrieveAttempt(c *gin.Context) { } // ListEvents handles GET /events -// Query params: tenant_id, destination_id, topic[], start, end, limit, next, prev, sort_order +// Query params: tenant_id, destination_id, topic[], time[gte], time[lte], time[gt], time[lt], limit, next, prev, include, order_by, dir func (h *LogHandlers) ListEvents(c *gin.Context) { // Authz: JWT users can only query their own tenant's events tenantID, ok := resolveTenantIDFilter(c) From 0cf56d75238ceabba78528b47ab0540b3ab283ed Mon Sep 17 00:00:00 2001 From: Alex Luong Date: Tue, 3 Feb 2026 20:55:03 +0700 Subject: [PATCH 2/2] fix: portal attempt query params --- internal/portal/src/scenes/Destination/Events/Attempts.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/portal/src/scenes/Destination/Events/Attempts.tsx b/internal/portal/src/scenes/Destination/Events/Attempts.tsx index 284270a4..8d07a3cc 100644 --- a/internal/portal/src/scenes/Destination/Events/Attempts.tsx +++ b/internal/portal/src/scenes/Destination/Events/Attempts.tsx @@ -46,19 +46,19 @@ const Attempts: React.FC = ({ switch (timeRange) { case "7d": searchParams.set( - "start", + "time[gte]", new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000).toISOString(), ); break; case "30d": searchParams.set( - "start", + "time[gte]", new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000).toISOString(), ); break; default: // 24h searchParams.set( - "start", + "time[gte]", new Date(now.getTime() - 24 * 60 * 60 * 1000).toISOString(), ); }