base detail order

This commit is contained in:
hamid zarghami
2026-01-28 09:24:26 +03:30
parent 6ad26fe032
commit a5ea0174ee
6 changed files with 81 additions and 35 deletions
+9 -1
View File
@@ -1,6 +1,7 @@
import axios from "@/config/axios";
import type {
MyOrdersResponseType,
OrderDetailResponseType,
OrderType,
ProductsResponseType,
} from "../type/Types";
@@ -12,7 +13,7 @@ export const getProducts = async () => {
};
export const submitOrder = async (params: OrderType[]) => {
const { data } = await axios.post(`/public/order`, { items: params });
const { data } = await axios.post(`/public/orders`, { items: params });
return data;
};
@@ -48,3 +49,10 @@ export const getMyOrders = async (
);
return data;
};
export const getOrderDetails = async (id: string) => {
const { data } = await axios.get<OrderDetailResponseType>(
`/public/orders/${id}`,
);
return data;
};