fix cart size in handler
This commit is contained in:
parent
0cac12b9b5
commit
fea80d75aa
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ func (fe *frontendServer) viewCartHandler(w http.ResponseWriter, r *http.Request
|
||||||
Quantity int32
|
Quantity int32
|
||||||
Price *pb.Money
|
Price *pb.Money
|
||||||
}
|
}
|
||||||
items := make([]cartItemView, cartSize(cart))
|
items := make([]cartItemView, len(cart))
|
||||||
totalPrice := pb.Money{CurrencyCode: currentCurrency(r)}
|
totalPrice := pb.Money{CurrencyCode: currentCurrency(r)}
|
||||||
for i, item := range cart {
|
for i, item := range cart {
|
||||||
p, err := fe.getProduct(r.Context(), item.GetProductId())
|
p, err := fe.getProduct(r.Context(), item.GetProductId())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue