dynamic add of amount of cards

This commit is contained in:
Florian Baumann 2022-01-06 13:44:46 +01:00
parent 5516cabd5a
commit 5a89a3bf97

View File

@ -18,8 +18,6 @@ const (
func Add(cards []string, count int64) error {
LogMessage(fmt.Sprintf("Serra %v\n", version), "green")
fmt.Println(count)
return nil
client := storage_connect()
coll := &Collection{client.Database("serra").Collection("cards")}
@ -37,7 +35,7 @@ func Add(cards []string, count int64) error {
// If duplicate key, increase count of card
if mongo.IsDuplicateKeyError(err) {
modify_count_of_card(coll, c, 1)
modify_count_of_card(coll, c, count)
continue
}