Skip to content

Commit 52eb6bf

Browse files
Tweak order response fields
- Change created-order status string from "created" to "order created" - Rename receipt JSON tag to receipt_s3_ke Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fe1ecd1 commit 52eb6bf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

producer/handlers/order.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (h *OrderHandler) CreateOrder(w http.ResponseWriter, r *http.Request) {
9494
log.Printf("Kafka event published for order %s", order.ID)
9595
}
9696

97-
order.Status = "created"
97+
order.Status = "order created"
9898
w.Header().Set("Content-Type", "application/json")
9999
w.WriteHeader(http.StatusCreated)
100100
json.NewEncoder(w).Encode(map[string]interface{}{

producer/models/order.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Order struct {
99
Quantity int `json:"quantity"`
1010
Price float64 `json:"price"`
1111
Status string `json:"status"`
12-
ReceiptKey string `json:"receipt_s3_key,omitempty"`
12+
ReceiptKey string `json:"receipt_s3_ke,omitempty"`
1313
CreatedAt time.Time `json:"created_at"`
1414
UpdatedAt time.Time `json:"updated_at"`
1515
}

0 commit comments

Comments
 (0)