Skip to content

Commit 916b94f

Browse files
authored
Merge pull request #6 from hervibest/fix/discount-type-issue
fix : Rename discount type payload from 'type' into 'discount_type'
2 parents 373faf9 + e7dda6c commit 916b94f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

photo-svc/internal/model/checkout_model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type DiscountItem struct {
3535
Amount int32 `json:"amount"`
3636
MinQuantity int `json:"min_quantity"`
3737
Value int32 `json:"value"`
38-
Type enum.DiscountType `json:"type"`
38+
Type enum.DiscountType `json:"discount_type"`
3939
}
4040

4141
type PreviewCheckoutRequest struct {

transaction-svc/internal/model/checkout_model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type DiscountItem struct {
3333
DiscountMinQuantity int `json:"min_quantity" validate:"required,gte=0"`
3434
DiscountValue int32 `json:"value" validate:"required,gt=0"`
3535
DiscountId string `json:"id" validate:"required"`
36-
DiscountType string `json:"type" validate:"required"`
36+
DiscountType string `json:"discount_type" validate:"required"`
3737
}
3838

3939
type PreviewCheckoutResponse struct {

0 commit comments

Comments
 (0)