Coupon system working properly
This commit is contained in:
@@ -73,6 +73,15 @@ export async function apiApplyCoupon(token, storeId, couponCode) {
|
||||
return handleResponse(res);
|
||||
}
|
||||
|
||||
export async function apiRemoveCoupon(token, storeId) {
|
||||
const res = await fetch(`${BASE}/coupon?storeId=${storeId}`, {
|
||||
method: "DELETE",
|
||||
headers: authHeaders(token),
|
||||
});
|
||||
|
||||
return handleResponse(res);
|
||||
}
|
||||
|
||||
export async function apiCheckout(token, { storeId }) {
|
||||
const res = await fetch(`${BASE}/checkout`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user