mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-06-06 20:37:32 +00:00
556bbedeca
add request classes and fix collection typing for clients, tasks and tags
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 },
|
|
})
|
|
);
|
|
}
|