cancel reason
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import axios from "../../../config/axios";
|
||||
import type {
|
||||
CancelReasonsResponseType,
|
||||
CreateCancelReasonType,
|
||||
NativeOrdersResponseType,
|
||||
OrderDetailResponseType,
|
||||
} from "../types/Types";
|
||||
@@ -30,3 +32,20 @@ export const getOrderDetailUser = async (
|
||||
const { data } = await axios.get(`/admin/orders/${id}/user`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const createCancelReason = async (params: CreateCancelReasonType) => {
|
||||
const { data } = await axios.post(`/admin/orders/cancel/reasons`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getCancelReasons = async (): Promise<
|
||||
CancelReasonsResponseType
|
||||
> => {
|
||||
const { data } = await axios.get(`/cancel/reasons`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const deleteCancelReason = async (id: string) => {
|
||||
const { data } = await axios.delete(`/cancel/reasons/${id}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user