Skip to content

Commit

Permalink
mintcard: Load inventory quantity information
Browse files Browse the repository at this point in the history
  • Loading branch information
kodawah committed Dec 18, 2024
1 parent faf8d4c commit 04cb1ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mintcard/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Card struct {
ID string `json:"Id"`
Name string `json:"Name"`
Number string `json:"Number,omitempty"`
Quantity string `json:"Quantity,omitempty"`
Quantity int `json:"Quantity,omitempty,string"`
Price string `json:"Price,omitempty"`
BuyPrice string `json:"Buy Price,omitempty"`
}
Expand Down
4 changes: 1 addition & 3 deletions mintcard/mintcard.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ func (mint *MTGMintCard) processEntry(card Card, condition, finish, langauge, ed
return
}

quantity := 1

var sellPrice float64
if card.Price != "" {
sellPrice, err = strconv.ParseFloat(card.Price, 64)
Expand All @@ -99,7 +97,7 @@ func (mint *MTGMintCard) processEntry(card Card, condition, finish, langauge, ed
out := &mtgban.InventoryEntry{
Conditions: cond,
Price: sellPrice,
Quantity: quantity,
Quantity: card.Quantity,
URL: link,
OriginalId: card.ID,
}
Expand Down

0 comments on commit 04cb1ee

Please sign in to comment.