diff --git a/src/internal/app/ui/product.go b/src/internal/app/ui/product.go index c8977f4..67dfdfa 100644 --- a/src/internal/app/ui/product.go +++ b/src/internal/app/ui/product.go @@ -2,7 +2,6 @@ package ui import ( "context" - "fmt" "strconv" "time" @@ -22,17 +21,16 @@ func GetProductPrice(srv *service.PriceService, prodID int) (*def.ProductPriceRe if err != nil { return res, err } + res.Price = price - // CalculateProductPrice(srv, prodID, res.Price) - fmt.Printf("SAving to cache: %s", key) srv.SaveToCache(ctx, key, res.Price, 30*time.Second) // FIXME refactor as cache service sth } return res, nil } +// CalculateProductPrice mock func CalculateProductPrice(srv *service.PriceService, prodID int, price float64) (float64, error) { - // customer := srv.GetCustomer(customerID) // customerPromo := srv.GetCustomerPromotions(customer) // customerDiscount := srv.GetCustomerDiscounts(customer)