fix
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f6916ae5bb
commit
af0b834bf3
4
db/db.go
4
db/db.go
|
@ -239,12 +239,12 @@ func GetStat(chatID int64) (map[string]int, error) {
|
||||||
}
|
}
|
||||||
for caloriesCursor.Next(context.Background()) {
|
for caloriesCursor.Next(context.Background()) {
|
||||||
var result Calories
|
var result Calories
|
||||||
if err := cursor.Decode(&result); err != nil {
|
if err := caloriesCursor.Decode(&result); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
res["Калории"] += result.Count
|
res["Калории"] += result.Count
|
||||||
}
|
}
|
||||||
if err := cursor.Err(); err != nil {
|
if err := caloriesCursor.Err(); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue