added useCreateTicket
This commit is contained in:
@@ -10,13 +10,7 @@ export type CreateTicketRequest = {
|
||||
order: number | undefined;
|
||||
subject: string;
|
||||
content: string;
|
||||
attachments: {
|
||||
id: number;
|
||||
file_link: string;
|
||||
date: string;
|
||||
size: number;
|
||||
name: string;
|
||||
}[];
|
||||
attachments: ServerFile[];
|
||||
};
|
||||
|
||||
const useCreateTicket = () => {
|
||||
@@ -28,9 +22,15 @@ const useCreateTicket = () => {
|
||||
|
||||
const handleCreateTicket = async (params: CreateTicketRequest) => {
|
||||
const { data } = await axios.post(
|
||||
API_ENDPOINTS.account.address.update,
|
||||
API_ENDPOINTS.tickets.create,
|
||||
{
|
||||
...params,
|
||||
message: {
|
||||
content: params.content,
|
||||
attachments: params.attachments,
|
||||
},
|
||||
subject: params.subject,
|
||||
ticket_category: params.ticket_category,
|
||||
order: params.order,
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user