From dc79aa2874ebd93037dc1d1d730225127590a73d Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 21 Nov 2021 19:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E5=90=8E=E7=A1=AE=E8=AE=A4AP?= =?UTF-8?q?I=E8=8A=82=E7=82=B9=E7=95=8C=E9=9D=A2=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E5=AE=89=E8=A3=85=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/actions/default/setup/confirm/index.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/web/actions/default/setup/confirm/index.go b/internal/web/actions/default/setup/confirm/index.go index c546f154..d41a4a25 100644 --- a/internal/web/actions/default/setup/confirm/index.go +++ b/internal/web/actions/default/setup/confirm/index.go @@ -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{""} // 初始化一个空的 }