fix file upload

This commit is contained in:
2025-05-15 12:40:27 +02:00
parent 16d25f034e
commit 79df1243e6
3 changed files with 8 additions and 4 deletions

View File

@@ -15,7 +15,9 @@ func SetStatistic(key string, value int64) error {
func GetStatistic(key string) int64 {
statistic := &model.Statistic{}
if err := db.Where("key = ?", key).First(statistic).Error; err != nil {
if err := db.Where(&model.Statistic{
Key: key,
}).First(statistic).Error; err != nil {
return 0
}
return statistic.Value