category ticket and group user and ...
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import axios from "../../../config/axios";
|
||||
import { AddMessageTicketType } from "../types/TicketTypes";
|
||||
import { AddMessageTicketType, CreateCategoryType } from "../types/TicketTypes";
|
||||
|
||||
export const getTickets = async (status: string) => {
|
||||
const { data } = await axios.get(`/tickets/admin?status=${status}`);
|
||||
@@ -23,3 +23,13 @@ export const closeTicket = async (id: string) => {
|
||||
const { data } = await axios.post(`/tickets/${id}/close`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const createCategory = async (params: CreateCategoryType) => {
|
||||
const { data } = await axios.post(`/tickets/category`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getCategories = async () => {
|
||||
const { data } = await axios.get(`/tickets/categories`);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user