自动检查更新被取消时,同时重置已发现的最新版本信息

This commit is contained in:
GoEdgeLab
2021-12-22 10:02:06 +08:00
parent bcb886c32a
commit bd4181361f

View File

@@ -4,6 +4,7 @@ package updates
import (
"encoding/json"
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
@@ -48,5 +49,11 @@ func (this *UpdateAction) RunPost(params struct {
return
}
// 重置状态
if !config.AutoCheck {
teaconst.NewVersionCode = ""
teaconst.NewVersionDownloadURL = ""
}
this.Success()
}