From 5a89a3bf97e31e44323c03e783b6b1d29505139f Mon Sep 17 00:00:00 2001 From: Florian Baumann Date: Thu, 6 Jan 2022 13:44:46 +0100 Subject: [PATCH] dynamic add of amount of cards --- src/serra/root.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/serra/root.go b/src/serra/root.go index df9319f..80bb9ff 100644 --- a/src/serra/root.go +++ b/src/serra/root.go @@ -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 }