fix spelling

This commit is contained in:
Florian Baumann 2023-06-30 09:13:26 +02:00
parent 10e84868e7
commit 884fbdf96d

View File

@ -32,6 +32,7 @@ var updateCmd = &cobra.Command{
coll := &Collection{client.Database("serra").Collection("cards")} coll := &Collection{client.Database("serra").Collection("cards")}
totalcoll := &Collection{client.Database("serra").Collection("total")} totalcoll := &Collection{client.Database("serra").Collection("total")}
// predefine query for set analysis. used for total stats later
projectStage := bson.D{{"$project", projectStage := bson.D{{"$project",
bson.D{ bson.D{
{"serra_count", true}, {"serra_count", true},
@ -75,6 +76,7 @@ var updateCmd = &cobra.Command{
BarEnd: fmt.Sprintf("| %s%s%s", Pink, set.Name, Reset), BarEnd: fmt.Sprintf("| %s%s%s", Pink, set.Name, Reset),
}), }),
) )
for _, card := range cards { for _, card := range cards {
bar.Add(1) bar.Add(1)
updatedCard, err := fetchCard(card.Set, card.CollectorNumber) updatedCard, err := fetchCard(card.Set, card.CollectorNumber)
@ -109,7 +111,7 @@ var updateCmd = &cobra.Command{
// do the update // do the update
setUpdate := bson.M{ setUpdate := bson.M{
"$set": bson.M{"serra_updated": p.Date, "card_count": set.CardCount}, "$set": bson.M{"serra_updated": p.Date, "cardcount": set.CardCount},
"$push": bson.M{"serra_prices": p}, "$push": bson.M{"serra_prices": p},
} }
// fmt.Printf("Set %s%s%s (%s) is now worth %s%.02f EUR%s\n", Pink, set.Name, Reset, set.Code, Yellow, setvalue[0]["value"], Reset) // fmt.Printf("Set %s%s%s (%s) is now worth %s%.02f EUR%s\n", Pink, set.Name, Reset, set.Code, Yellow, setvalue[0]["value"], Reset)