order ticket
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import axios from "@/config/axios";
|
||||
import type {
|
||||
AddTicketType,
|
||||
MyOrdersResponseType,
|
||||
OrderDetailResponseType,
|
||||
OrderType,
|
||||
ProductsResponseType,
|
||||
TicketsResponseType,
|
||||
} from "../type/Types";
|
||||
import { OrderStatusEnum, TabMyOrdersEnum } from "../enum/OrderEnum";
|
||||
|
||||
@@ -56,3 +58,15 @@ export const getOrderDetails = async (id: string) => {
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getTickets = async (orderId: string) => {
|
||||
const { data } = await axios.get<TicketsResponseType>(
|
||||
`/public/ticket/order/${orderId}`,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const addTicket = async (orderId: string, params: AddTicketType) => {
|
||||
const { data } = await axios.post(`/public/ticket/order/${orderId}`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user