ticket master
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
AddMessageTicketType,
|
||||
CreateCategoryType,
|
||||
CreateTicketAdminType,
|
||||
CreateTicketMasterType,
|
||||
} from "../types/TicketTypes";
|
||||
|
||||
export const getTickets = async (
|
||||
@@ -63,3 +64,28 @@ export const createTicket = async (params: CreateTicketAdminType) => {
|
||||
const { data } = await axios.post(`/tickets/admin`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getMasters = async () => {
|
||||
const { data } = await axios.get(`/tickets/masters`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getMasterById = async (id: string) => {
|
||||
const { data } = await axios.get(`/tickets/masters/${id}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const createMaster = async (params: CreateTicketMasterType) => {
|
||||
const { data } = await axios.post(`/tickets/masters`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const updateMaster = async (id: string, params: CreateTicketMasterType) => {
|
||||
const { data } = await axios.patch(`/tickets/masters/${id}`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const deleteMaster = async (id: string) => {
|
||||
const { data } = await axios.delete(`/tickets/masters/${id}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user