hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client, normalizePage, pageQuery, type Page, type PageParams } from "../client"; |
| 2 | import type { PaymentLine } from "./types"; |
| 3 | |
| 4 | export async function getPaymentLedgerByUserId( |
| 5 | userId: string, |
| 6 | params?: PageParams, |
| 7 | signal?: AbortSignal, |
| 8 | ): Promise<Page<PaymentLine>> { |
| 9 | const data = await client<unknown>( |
| 10 | `/payments/ledger/${encodeURIComponent(userId)}${pageQuery(params)}`, |
| 11 | { signal }, |
| 12 | ); |
| 13 | return normalizePage<PaymentLine>(data); |
| 14 | } |