fix error
This commit is contained in:
@@ -15,9 +15,9 @@ export const getProducts = async () => {
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getAttributes = async (productId?: number) => {
|
||||
export const getAttributes = async (productId?: string) => {
|
||||
const { data } = await axios.get<AttributeResponseType>(
|
||||
`/public/entity/${productId}/field`
|
||||
`/public/entity/${productId}/field`,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
@@ -29,7 +29,7 @@ export const submitOrder = async (params: OrderType[]) => {
|
||||
|
||||
export const getMyOrders = async (
|
||||
page: number = 1,
|
||||
active: TabMyOrdersEnum
|
||||
active: TabMyOrdersEnum,
|
||||
) => {
|
||||
const statuses =
|
||||
active === TabMyOrdersEnum.IN_PROGRESS
|
||||
@@ -55,21 +55,21 @@ export const getMyOrders = async (
|
||||
query += `&statuses=${statuses}`;
|
||||
}
|
||||
const { data } = await axios.get<MyOrdersResponseType>(
|
||||
`/public/orders${query}`
|
||||
`/public/orders${query}`,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getOrderDetails = async (id: string) => {
|
||||
const { data } = await axios.get<OrderDetailResponseType>(
|
||||
`/public/orders/${id}`
|
||||
`/public/orders/${id}`,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getTickets = async (id: string) => {
|
||||
const { data } = await axios.get<TicketsResponseType>(
|
||||
`/public/ticket/order/item/${id}`
|
||||
`/public/ticket/order/item/${id}`,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user