list of orders

This commit is contained in:
hamid zarghami
2025-12-07 14:54:19 +03:30
parent 456f1a234f
commit 96650106a0
10 changed files with 463 additions and 206 deletions
+19
View File
@@ -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;
};