create discount

This commit is contained in:
hamid zarghami
2025-09-27 11:51:05 +03:30
parent ee89008a9f
commit 0fa7fbf99b
13 changed files with 712 additions and 25 deletions
+14
View File
@@ -0,0 +1,14 @@
import axios from "../../../config/axios";
import type { CreateCouponType, CouponType } from "../types/Types";
export const getCoupons = async (page: number = 1) => {
const { data } = await axios.get(`/admin/coupon/native?page=${page}`);
return data;
};
export const createCoupon = async (
couponData: CreateCouponType
): Promise<CouponType> => {
const { data } = await axios.post("/admin/coupon", couponData);
return data;
};