fix: 解决安装包下载路径错误的问题 (#4954)

This commit is contained in:
ssongliu
2024-05-10 06:56:24 +00:00
committed by GitHub
parent d5c75f4eee
commit df53193f3f
+5 -1
View File
@@ -96,7 +96,11 @@ func (u *UpgradeService) Upgrade(req dto.Upgrade) error {
return err
}
downloadPath := fmt.Sprintf("%s/%s/%s/release", global.CONF.System.RepoUrl, global.CONF.System.Mode, req.Version)
mode := global.CONF.System.Mode
if strings.Contains(req.Version, "beta") {
mode = "beta"
}
downloadPath := fmt.Sprintf("%s/%s/%s/release", global.CONF.System.RepoUrl, mode, req.Version)
fileName := fmt.Sprintf("1panel-%s-%s-%s.tar.gz", req.Version, "linux", itemArch)
_ = settingRepo.Update("SystemStatus", "Upgrading")
go func() {