update app

This commit is contained in:
wangchuxiao
2022-05-10 17:17:20 +08:00
parent 608b166b32
commit f5d4397f0b
4 changed files with 29 additions and 33 deletions
@@ -31,10 +31,10 @@ func UpdateAppVersion(appType int, version string, forceUpdate bool, fileName, y
func GetNewestVersion(appType int) (*db.AppVersion, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
app := db.AppVersion{}
if err != nil {
return nil, err
return &app, err
}
dbConn.LogMode(true)
app := db.AppVersion{}
return &app, dbConn.Model(db.AppVersion{}).First(&app, appType).Error
}