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.
This commit is contained in:
2026-08-22 00:34:49 +01:00
parent aad364bbd1
commit df4c9afeb9
+1 -7
View File
@@ -1106,13 +1106,7 @@ func BuyGiftCard(w http.ResponseWriter, r *http.Request) {
} }
recipient = userEmail recipient = userEmail
} }
// Notify admin about the friend gift card (email delivery not yet implemented — admin must send manually) // TODO: send gift card code via email to recipient once SMTP is wired
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)
}
log.Printf("GIFT CARD FOR FRIEND — code: %s, value: £%.2f, intended for: %s", cardID, amountPounds, recipient) log.Printf("GIFT CARD FOR FRIEND — code: %s, value: £%.2f, intended for: %s", cardID, amountPounds, recipient)
_, err = db.Conn.Exec(ctx, ` _, err = db.Conn.Exec(ctx, `