Coupon system working properly

This commit is contained in:
augmentedpotato
2026-04-15 00:54:46 -06:00
parent 51a03fe2c5
commit 3f5add59e8
7 changed files with 263 additions and 32 deletions

View File

@@ -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",