fixes for latest openapi spec changes

This commit is contained in:
2026-05-23 17:22:30 +05:30
parent a1ff2c692c
commit cccb4604fd
3 changed files with 16 additions and 13 deletions

View File

@@ -9,10 +9,13 @@ export interface ReportParams {
}
export function useReport(params: ReportParams) {
const { useList } = useResourceByName("reports");
const { useRead } = useResourceByName("reports");
return useList({
...params,
periods: params.periods,
});
return useRead(
params.snapshot_id ? params.snapshot_id : "latest",
{
...params,
periods: params.periods,
}
);
}