From af0b834bf3fdd4288529ff895da37246e399df84 Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Sun, 12 Mar 2023 14:06:42 +0700 Subject: [PATCH] fix --- db/db.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db.go b/db/db.go index b014190..b9429c4 100644 --- a/db/db.go +++ b/db/db.go @@ -239,12 +239,12 @@ func GetStat(chatID int64) (map[string]int, error) { } for caloriesCursor.Next(context.Background()) { var result Calories - if err := cursor.Decode(&result); err != nil { + if err := caloriesCursor.Decode(&result); err != nil { log.Fatal(err) } res["Калории"] += result.Count } - if err := cursor.Err(); err != nil { + if err := caloriesCursor.Err(); err != nil { log.Fatal(err) }