Skip to content
Snippets Groups Projects

typo: Ammount -> Amount

Merged Quique requested to merge quique/cicer:ammount into master
10 files
+ 33
33
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 3
3
@@ -34,7 +34,7 @@ type OrderPurchase struct {
OrderID uint `json:"order_id"`
Order *Order `json:"-"`
Price int `json:"price"`
Ammount int `json:"ammount"`
Amount int `json:"amount"`
}
type OrderGetResponse struct {
@@ -65,7 +65,7 @@ func (a *api) deactivateOrders() {
for _, order := range orders {
total := 0
for _, purchase := range order.Purchases {
total += purchase.Price * purchase.Ammount
total += purchase.Price * purchase.Amount
}
transaction := Transaction{
@@ -228,7 +228,7 @@ func (a *api) AddOrderPurchase(num int, w http.ResponseWriter, req *http.Request
found := false
for _, product := range order.Products {
if product.Code == p.ProductCode {
total += product.Price * p.Ammount
total += product.Price * p.Amount
purchase[i].Price = product.Price
found = true
break
Loading