restaurant list fix + pager

This commit is contained in:
hamid zarghami
2026-01-04 12:04:03 +03:30
parent cd73c22c3f
commit 9af21acb90
4 changed files with 42 additions and 11 deletions
+7 -2
View File
@@ -47,8 +47,13 @@ export const getReports = async (): Promise<ReportsResponse> => {
return data;
};
export const getRestaurants = async (): Promise<RestaurantsResponse> => {
const { data } = await axios.get("/admin/dmenu/restaurants");
export const getRestaurants = async (
page: number = 1,
limit: number = 10
): Promise<RestaurantsResponse> => {
const { data } = await axios.get(
`/admin/dmenu/restaurants?page=${page}&limit=${limit}`
);
return data;
};