迁移后确认API节点界面可以跳转到安装界面

This commit is contained in:
GoEdgeLab
2021-11-21 19:25:42 +08:00
parent 7108a446f6
commit dc79aa2874

View File

@@ -26,11 +26,15 @@ func (this *IndexAction) RunGet(params struct{}) {
config, err := configs.LoadAPIConfig()
if err == nil {
endpoints = config.RPC.Endpoints
this.Data["nodeId"] = config.NodeId
this.Data["secret"] = config.Secret
this.Data["canInstall"] = false
} else {
this.Data["nodeId"] = ""
this.Data["secret"] = ""
this.Data["canInstall"] = true
}
this.Data["nodeId"] = config.NodeId
this.Data["secret"] = config.Secret
if len(endpoints) == 0 {
endpoints = []string{""} // 初始化一个空的
}