refactor: remove default_install_dir, Update uses built-in default path
This commit is contained in:
@@ -229,7 +229,6 @@ type Version struct {
|
||||
EntryFile string `gorm:"size:255" json:"entry_file"`
|
||||
EntryFiles string `gorm:"type:text" json:"entry_files"` // JSON数组,可启动的入口文件
|
||||
DesktopShortcutFiles string `gorm:"type:text" json:"desktop_shortcut_files"` // JSON数组,需要创建桌面快捷方式的文件
|
||||
DefaultInstallDir string `gorm:"size:500" json:"default_install_dir"` // 默认安装目录
|
||||
UpdateStrategy string `gorm:"size:20;default:optional" json:"update_strategy"`
|
||||
UpdateType string `gorm:"size:20;default:full" json:"update_type"`
|
||||
UpdateMethod string `gorm:"size:20;default:auto" json:"update_method"`
|
||||
|
||||
@@ -256,7 +256,6 @@ func handleGetVersionByID(c *gin.Context) {
|
||||
"entry_file": version.EntryFile,
|
||||
"entry_files": version.EntryFiles,
|
||||
"desktop_shortcut_files": version.DesktopShortcutFiles,
|
||||
"default_install_dir": version.DefaultInstallDir,
|
||||
"full_package_path": version.FullPackagePath,
|
||||
"full_package_size": version.FullPackageSize,
|
||||
"full_package_hash": version.FullPackageHash,
|
||||
@@ -275,7 +274,6 @@ type CreateVersionRequest struct {
|
||||
EntryFile string `json:"entry_file"`
|
||||
EntryFiles string `json:"entry_files"`
|
||||
DesktopShortcutFiles string `json:"desktop_shortcut_files"`
|
||||
DefaultInstallDir string `json:"default_install_dir"`
|
||||
UpdateStrategy string `json:"update_strategy"`
|
||||
UpdateType string `json:"update_type"`
|
||||
UpdateMethod string `json:"update_method"`
|
||||
@@ -330,7 +328,6 @@ func handleCreateVersionGlobal(c *gin.Context) {
|
||||
EntryFile: req.EntryFile,
|
||||
EntryFiles: req.EntryFiles,
|
||||
DesktopShortcutFiles: req.DesktopShortcutFiles,
|
||||
DefaultInstallDir: req.DefaultInstallDir,
|
||||
UpdateStrategy: req.UpdateStrategy,
|
||||
UpdateType: req.UpdateType,
|
||||
UpdateMethod: req.UpdateMethod,
|
||||
@@ -475,7 +472,6 @@ type UpdateVersionRequest struct {
|
||||
EntryFile string `json:"entry_file"`
|
||||
EntryFiles string `json:"entry_files"`
|
||||
DesktopShortcutFiles string `json:"desktop_shortcut_files"`
|
||||
DefaultInstallDir string `json:"default_install_dir"`
|
||||
UpdateStrategy string `json:"update_strategy"`
|
||||
UpdateType string `json:"update_type"`
|
||||
UpdateMethod string `json:"update_method"`
|
||||
@@ -543,7 +539,6 @@ func handleUpdateVersionGlobal(c *gin.Context) {
|
||||
updates["entry_file"] = req.EntryFile
|
||||
updates["entry_files"] = req.EntryFiles
|
||||
updates["desktop_shortcut_files"] = req.DesktopShortcutFiles
|
||||
updates["default_install_dir"] = req.DefaultInstallDir
|
||||
if req.UpdateStrategy != "" {
|
||||
updates["update_strategy"] = req.UpdateStrategy
|
||||
}
|
||||
|
||||
@@ -122,8 +122,7 @@ func handleAppCheckUpdate(c *gin.Context) {
|
||||
"entry_file": latestVersion.EntryFile,
|
||||
"entry_files": latestVersion.EntryFiles,
|
||||
"desktop_shortcut_files": latestVersion.DesktopShortcutFiles,
|
||||
"default_install_dir": latestVersion.DefaultInstallDir,
|
||||
"update_notes": latestVersion.Description,
|
||||
"update_notes": latestVersion.Description,
|
||||
"update_strategy": latestVersion.UpdateStrategy,
|
||||
"update_type": latestVersion.UpdateType,
|
||||
"update_method": latestVersion.UpdateMethod,
|
||||
|
||||
Reference in New Issue
Block a user