mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +00:00
fix file upload
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user