From 2d321b4a79a539ae0278aba33650a2b6820bd082 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 9 May 2023 17:31:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20app.yaml=20=E5=A2=9E=E5=8A=A0=20usernam?= =?UTF-8?q?e=20=E5=92=8C=20password=20=E5=8F=82=E6=95=B0=20(#960)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/init/viper/viper.go | 6 +++--- cmd/server/conf/app.yaml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/init/viper/viper.go b/backend/init/viper/viper.go index 660c1070b..3ad127f05 100644 --- a/backend/init/viper/viper.go +++ b/backend/init/viper/viper.go @@ -75,13 +75,13 @@ func Init() { version = serverConfig.System.Version } if serverConfig.System.Username != "" { - version = serverConfig.System.Username + username = serverConfig.System.Username } if serverConfig.System.Password != "" { - version = serverConfig.System.Password + password = serverConfig.System.Password } if serverConfig.System.Entrance != "" { - version = serverConfig.System.Entrance + entrance = serverConfig.System.Entrance } } diff --git a/cmd/server/conf/app.yaml b/cmd/server/conf/app.yaml index b3c96dc79..20865f3ae 100644 --- a/cmd/server/conf/app.yaml +++ b/cmd/server/conf/app.yaml @@ -5,6 +5,8 @@ system: repo_url: https://resource.fit2cloud.com/1panel/package is_demo: false port: 9999 + username: admin + password: admin123 log: level: debug