13 lines
459 B
TypeScript
13 lines
459 B
TypeScript
import type { paths } from '@/shared/api/schema';
|
|
|
|
import { api } from '@/shared/api/client';
|
|
|
|
type IncomeListPath = paths['/incomes/list/{id}']['get']['parameters']['path'];
|
|
type IncomeListResponse = paths['/incomes/list/{id}']['get']['responses']['200']['content']['application/json'];
|
|
|
|
export async function getIncomeList(path: IncomeListPath) {
|
|
const { data: result } = await api.get<IncomeListResponse>(`/incomes/list/${path.id}`);
|
|
|
|
return result;
|
|
}
|