Points now subtract from costs

This commit is contained in:
augmentedpotato
2026-04-15 02:44:14 -06:00
parent 404f162728
commit 914e0bceda
6 changed files with 192 additions and 7 deletions

View File

@@ -73,6 +73,15 @@ export async function apiApplyCoupon(token, storeId, couponCode) {
return handleResponse(res);
}
export async function apiApplyPoints(token, storeId, useLoyaltyPoints) {
const res = await fetch(`${BASE}/apply-points?storeId=${storeId}&useLoyaltyPoints=${useLoyaltyPoints}`, {
method: "POST",
headers: authHeaders(token),
});
return handleResponse(res);
}
export async function apiRemoveCoupon(token, storeId) {
const res = await fetch(`${BASE}/coupon?storeId=${storeId}`, {
method: "DELETE",