base detail order
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user