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