Ajouter et Retirer des points de fidélité

This commit is contained in:
2026-06-11 07:59:03 -04:00
parent ccafc24f72
commit e33acdf151
2 changed files with 28 additions and 1 deletions
+8
View File
@@ -6,4 +6,12 @@ export function registerCustomer(customer) {
export function findCustomerByPhone(phoneNumber) {
return client.get(`/api/customers/phone/${encodeURIComponent(phoneNumber)}`);
}
export function addLoyaltyPoints(customerId, points) {
return client.post(`/api/customers/${customerId}/loyalty/add`, null, { params: { points } });
}
export function subtractLoyaltyPoints(customerId, points) {
return client.post(`/api/customers/${customerId}/loyalty/subtract`, null, { params: { points } });
}