feat(telecart): add vouchers and coupons (#9)
This commit is contained in:
@@ -72,4 +72,24 @@ export async function getFiltersForMainPage() {
|
||||
return await ftch('filtersForMainPage');
|
||||
}
|
||||
|
||||
export async function setCoupon(coupon) {
|
||||
const formData = new FormData();
|
||||
formData.append('coupon', coupon);
|
||||
|
||||
return await apiFetch(`${BASE_URL}index.php?route=extension/total/coupon/coupon`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
});
|
||||
}
|
||||
|
||||
export async function setVoucher(voucher) {
|
||||
const formData = new FormData();
|
||||
formData.append('voucher', voucher);
|
||||
|
||||
return await apiFetch(`${BASE_URL}index.php?route=extension/total/voucher/voucher`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
});
|
||||
}
|
||||
|
||||
export default ftch;
|
||||
|
||||
Reference in New Issue
Block a user