mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-09 00:32:15 +01:00
13 lines
396 B
TypeScript
13 lines
396 B
TypeScript
import { api } from '@/packages/api/src';
|
|
import type { Report } from '@/packages/api/src';
|
|
import { fetchAllPages } from '@/utils/fetchAllPages';
|
|
|
|
export async function fetchAllReports(organizationId: string): Promise<Report[]> {
|
|
return fetchAllPages((page) =>
|
|
api.getReports({
|
|
params: { organization: organizationId },
|
|
queries: { page },
|
|
})
|
|
);
|
|
}
|