In useWebhookNotifications (web/lib/api/hooks.ts), start and end go into the request URL but are missing from the query key:
queryKey: [
'webhook-notification',
eventType,
page,
limit,
deviceId,
webhookSubscriptionId,
status,
],
queryFn: () =>
httpBrowserClient.get(`...&start=${start}&end=${end}&...`)
react-query only refetches when the key changes, so switching the date range on the webhook history page (say from Last 90 Days to Last 7 Days) serves the cached result for the old range. Same for a custom range. The server does filter on these params (webhook.service.ts builds a createdAt match from them), the request just never goes out again. The filter looks applied but the table never changes.
Fix is adding start and end to the key array.
In
useWebhookNotifications(web/lib/api/hooks.ts),startandendgo into the request URL but are missing from the query key:react-query only refetches when the key changes, so switching the date range on the webhook history page (say from Last 90 Days to Last 7 Days) serves the cached result for the old range. Same for a custom range. The server does filter on these params (
webhook.service.tsbuilds acreatedAtmatch from them), the request just never goes out again. The filter looks applied but the table never changes.Fix is adding
startandendto the key array.