From 83986e7a35cd6a03e587bd64957821357fd99aca Mon Sep 17 00:00:00 2001 From: matst80 Date: Wed, 1 Jul 2026 10:47:28 +0200 Subject: [PATCH] actor --- internal/ucp/customer.go | 2 ++ pkg/order/email_preferences.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/ucp/customer.go b/internal/ucp/customer.go index 4450cd3..f037b9e 100644 --- a/internal/ucp/customer.go +++ b/internal/ucp/customer.go @@ -400,6 +400,8 @@ func (s *CustomerServer) handleDeleteCustomer(w http.ResponseWriter, r *http.Req // Log audit trail to stdout (GDPR requirement) fmt.Printf("AUDIT: GDPR right to erasure executed for customer profile id %d\n", id) + s.indexProfileAfterMutation(r.Context(), id) + w.WriteHeader(http.StatusNoContent) } diff --git a/pkg/order/email_preferences.go b/pkg/order/email_preferences.go index e355790..bc24ca9 100644 --- a/pkg/order/email_preferences.go +++ b/pkg/order/email_preferences.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "net/http" + "net/url" "strings" "time" ) @@ -44,7 +45,7 @@ type customerLookupResponse struct { // returns the parsed email preferences. Returns nil, nil when the profile // is not found (unknown email -> allow all). func (c *ProfilePreferencesClient) fetchPreferences(ctx context.Context, email string) (*emailPreferencesResponse, error) { - url := fmt.Sprintf("%s/by-email/%s", c.baseURL, email) + url := fmt.Sprintf("%s/by-email/%s", c.baseURL, url.PathEscape(email)) req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) if err != nil { return nil, err