detail of order

This commit is contained in:
hamid zarghami
2025-12-07 16:12:54 +03:30
parent 8240a8170f
commit 10e5143d78
5 changed files with 220 additions and 83 deletions
+10 -1
View File
@@ -1,5 +1,5 @@
import axios from "@/config/axios";
import type { GetOrdersResponse } from "../types/Types";
import type { GetOrdersResponse, GetOrderByIdResponse } from "../types/Types";
export interface GetOrdersParams {
page?: number;
@@ -17,3 +17,12 @@ export const getOrders = async (
});
return data;
};
export const getOrderById = async (
orderId: string
): Promise<GetOrderByIdResponse> => {
const { data } = await axios.get<GetOrderByIdResponse>(
`/admin/orders/${orderId}`
);
return data;
};