From c6ec4671a49e0a8740b009e5ce417d622894698c Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Thu, 12 Mar 2026 14:50:51 +0100 Subject: [PATCH] fix: match report_schedules JSON key from backend response --- lib/api/report-schedules.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/report-schedules.ts b/lib/api/report-schedules.ts index 44b5e92..a148de0 100644 --- a/lib/api/report-schedules.ts +++ b/lib/api/report-schedules.ts @@ -42,8 +42,8 @@ export interface UpdateReportScheduleRequest { } export async function listReportSchedules(siteId: string): Promise { - const res = await apiRequest<{ schedules: ReportSchedule[] }>(`/sites/${siteId}/report-schedules`) - return res?.schedules ?? [] + const res = await apiRequest<{ report_schedules: ReportSchedule[] }>(`/sites/${siteId}/report-schedules`) + return res?.report_schedules ?? [] } export async function createReportSchedule(siteId: string, data: CreateReportScheduleRequest): Promise {