Skip to content

Commit fe3f451

Browse files
committed
add last update param to product response
1 parent b704d60 commit fe3f451

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

api-products/api/service/product_service_impl.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func (p *ProductServiceImpl) GetAll() ([]response.ProductResponse, error) {
3030
Category: product.Category,
3131
DiscountedPrice: product.DiscountedPrice,
3232
OriginalPrice: product.OriginalPrice,
33+
LastUpdated: product.LastUpdated,
3334
}
3435

3536
products = append(products, productResponse)

shared/json/response/product_response.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ type ProductResponse struct {
66
Category string `json:"category"`
77
OriginalPrice int `json:"original_price"`
88
DiscountedPrice int `json:"discounted_price"`
9+
LastUpdated string `json:"last_updated"`
910
}

0 commit comments

Comments
 (0)