create ticket admin

This commit is contained in:
hamid zarghami
2025-05-25 10:33:22 +03:30
parent 08d66eec06
commit 4bb95b4d08
6 changed files with 253 additions and 109 deletions
+10 -1
View File
@@ -1,5 +1,9 @@
import axios from "../../../config/axios";
import { AddMessageTicketType, CreateCategoryType } from "../types/TicketTypes";
import {
AddMessageTicketType,
CreateCategoryType,
CreateTicketAdminType,
} from "../types/TicketTypes";
export const getTickets = async (
status: string,
@@ -54,3 +58,8 @@ export const openTicket = async (id: string) => {
const { data } = await axios.post(`/tickets/${id}/open`);
return data;
};
export const createTicket = async (params: CreateTicketAdminType) => {
const { data } = await axios.post(`/tickets/admin`, params);
return data;
};