restaurant list fix + pager
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user