style(catalog): ✨ Format JSON struct for consistency
This commit is contained in:
@@ -176,13 +176,13 @@ func (h *Handlers) SendProductList(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var req struct {
|
var req struct {
|
||||||
AccountID string `json:"account_id"`
|
AccountID string `json:"account_id"`
|
||||||
To string `json:"to"`
|
To string `json:"to"`
|
||||||
HeaderText string `json:"header_text"`
|
HeaderText string `json:"header_text"`
|
||||||
BodyText string `json:"body_text"`
|
BodyText string `json:"body_text"`
|
||||||
FooterText string `json:"footer_text"`
|
FooterText string `json:"footer_text"`
|
||||||
CatalogID string `json:"catalog_id"`
|
CatalogID string `json:"catalog_id"`
|
||||||
Sections []businessapi.ProductListSection `json:"sections"`
|
Sections []businessapi.ProductListSection `json:"sections"`
|
||||||
}
|
}
|
||||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||||
|
|||||||
@@ -792,7 +792,7 @@ type BusinessProfile struct {
|
|||||||
// BusinessProfileUpdate is the payload sent to update business profile fields.
|
// BusinessProfileUpdate is the payload sent to update business profile fields.
|
||||||
// Only populated fields are sent; omit a field to leave it unchanged.
|
// Only populated fields are sent; omit a field to leave it unchanged.
|
||||||
type BusinessProfileUpdate struct {
|
type BusinessProfileUpdate struct {
|
||||||
MessagingProduct string `json:"messaging_product"` // always "whatsapp"
|
MessagingProduct string `json:"messaging_product"` // always "whatsapp"
|
||||||
About string `json:"about,omitempty"`
|
About string `json:"about,omitempty"`
|
||||||
Address string `json:"address,omitempty"`
|
Address string `json:"address,omitempty"`
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user