refactor: rename points earn endpoint to /points/earn for clarity
Some checks failed
Some checks failed
Use /points/earn and /points/redeem consistently for explicit intent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -647,7 +647,7 @@ def void_stamps(
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
|
|
||||||
@store_router.post("/points", response_model=PointsEarnResponse)
|
@store_router.post("/points/earn", response_model=PointsEarnResponse)
|
||||||
def earn_points(
|
def earn_points(
|
||||||
request: Request,
|
request: Request,
|
||||||
data: PointsEarnRequest,
|
data: PointsEarnRequest,
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ function storeLoyaltyTerminal() {
|
|||||||
async earnPoints() {
|
async earnPoints() {
|
||||||
loyaltyTerminalLog.info('Earning points...', { amount: this.earnAmount });
|
loyaltyTerminalLog.info('Earning points...', { amount: this.earnAmount });
|
||||||
|
|
||||||
const response = await apiClient.post('/store/loyalty/points', {
|
const response = await apiClient.post('/store/loyalty/points/earn', {
|
||||||
card_id: this.selectedCard.id,
|
card_id: this.selectedCard.id,
|
||||||
purchase_amount_cents: Math.round(this.earnAmount * 100),
|
purchase_amount_cents: Math.round(this.earnAmount * 100),
|
||||||
staff_pin: this.pinDigits
|
staff_pin: this.pinDigits
|
||||||
|
|||||||
Reference in New Issue
Block a user