single order
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import axios from "@/config/axios";
|
||||
import type { ProductsResponseType } from "../type/Types";
|
||||
import type { OrderType, ProductsResponseType } from "../type/Types";
|
||||
|
||||
export const getProducts = async () => {
|
||||
const { data } = await axios.get<ProductsResponseType>(`/public/products`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const submitOrder = async (params: OrderType[]) => {
|
||||
const { data } = await axios.post(`/public/order`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user