From df4c9afeb987970f70414edcec8256493ca6d37f Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Thu, 30 Jul 2026 19:42:41 +0100 Subject: [PATCH] fix: remove admin notification for friend gift card purchase Admin no longer receives a notification when someone buys a gift card for a friend. The recipient email and gift code are logged for future SMTP delivery instead. --- backend/handlers/payments/giftcards.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/handlers/payments/giftcards.go b/backend/handlers/payments/giftcards.go index d1a29ad..999fa57 100644 --- a/backend/handlers/payments/giftcards.go +++ b/backend/handlers/payments/giftcards.go @@ -1106,13 +1106,7 @@ func BuyGiftCard(w http.ResponseWriter, r *http.Request) { } recipient = userEmail } - // Notify admin about the friend gift card (email delivery not yet implemented — admin must send manually) - if _, err := db.Conn.Exec(context.Background(), ` - INSERT INTO admin_notifications (reason, booking_id, user_id) - VALUES ('gift_card_purchased_for_friend', NULL, $1) - `, userID); err != nil { - log.Printf("ALERT: failed to create admin notification for gift card %s: %v", cardID, err) - } + // TODO: send gift card code via email to recipient once SMTP is wired log.Printf("GIFT CARD FOR FRIEND — code: %s, value: £%.2f, intended for: %s", cardID, amountPounds, recipient) _, err = db.Conn.Exec(ctx, `