list of orders
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import axios from "@/config/axios";
|
||||
import type { GetOrdersResponse } from "../types/Types";
|
||||
|
||||
export interface GetOrdersParams {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
search?: string;
|
||||
status?: string;
|
||||
deliveryType?: string;
|
||||
}
|
||||
|
||||
export const getOrders = async (
|
||||
params?: GetOrdersParams
|
||||
): Promise<GetOrdersResponse> => {
|
||||
const { data } = await axios.get<GetOrdersResponse>("/admin/orders", {
|
||||
params,
|
||||
});
|
||||
return data;
|
||||
};
|
||||
Reference in New Issue
Block a user