From 947761313b0eb73a54a692246463467ebd6932ec Mon Sep 17 00:00:00 2001 From: Hein Date: Wed, 4 Feb 2026 11:18:50 +0200 Subject: [PATCH] =?UTF-8?q?style(catalog):=20=E2=9C=A8=20Format=20JSON=20s?= =?UTF-8?q?truct=20for=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/handlers/catalog.go | 14 +++++++------- pkg/whatsapp/businessapi/types.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/handlers/catalog.go b/pkg/handlers/catalog.go index 5183fe0..2890be6 100644 --- a/pkg/handlers/catalog.go +++ b/pkg/handlers/catalog.go @@ -176,13 +176,13 @@ func (h *Handlers) SendProductList(w http.ResponseWriter, r *http.Request) { } var req struct { - AccountID string `json:"account_id"` - To string `json:"to"` - HeaderText string `json:"header_text"` - BodyText string `json:"body_text"` - FooterText string `json:"footer_text"` - CatalogID string `json:"catalog_id"` - Sections []businessapi.ProductListSection `json:"sections"` + AccountID string `json:"account_id"` + To string `json:"to"` + HeaderText string `json:"header_text"` + BodyText string `json:"body_text"` + FooterText string `json:"footer_text"` + CatalogID string `json:"catalog_id"` + Sections []businessapi.ProductListSection `json:"sections"` } if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusBadRequest) diff --git a/pkg/whatsapp/businessapi/types.go b/pkg/whatsapp/businessapi/types.go index 4c74583..aedb0a6 100644 --- a/pkg/whatsapp/businessapi/types.go +++ b/pkg/whatsapp/businessapi/types.go @@ -792,7 +792,7 @@ type BusinessProfile struct { // BusinessProfileUpdate is the payload sent to update business profile fields. // Only populated fields are sent; omit a field to leave it unchanged. type BusinessProfileUpdate struct { - MessagingProduct string `json:"messaging_product"` // always "whatsapp" + MessagingProduct string `json:"messaging_product"` // always "whatsapp" About string `json:"about,omitempty"` Address string `json:"address,omitempty"` Description string `json:"description,omitempty"`