mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 12:36:00 +08:00
update app
This commit is contained in:
@@ -32,7 +32,7 @@ type UploadUpdateAppReq struct {
|
||||
Version string `form:"version" binding:"required"`
|
||||
File *multipart.FileHeader `form:"file" binding:"required"`
|
||||
Yaml *multipart.FileHeader `form:"yaml" binding:"required"`
|
||||
ForceUpdate bool `form:"forceUpdate" binding:"required"`
|
||||
ForceUpdate bool `form:"forceUpdate"`
|
||||
}
|
||||
|
||||
type UploadUpdateAppResp struct {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user