From 79622f324bfc14da11b9437981cdb303826ae8dd Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 25 Apr 2023 18:02:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201pctl=20user-info=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20protocol=20=E4=BF=A1=E6=81=AF=20(#781)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/server/cmd/user-info.go | 9 ++++++++- frontend/src/views/setting/safe/ssl/index.vue | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/server/cmd/user-info.go b/cmd/server/cmd/user-info.go index fe64dacc2..c88bd3c72 100644 --- a/cmd/server/cmd/user-info.go +++ b/cmd/server/cmd/user-info.go @@ -39,6 +39,7 @@ var userinfoCmd = &cobra.Command{ user := getSettingByKey(db, "UserName") password := getSettingByKey(db, "Password") port := getSettingByKey(db, "ServerPort") + ssl := getSettingByKey(db, "SSL") entrance := getSettingByKey(db, "SecurityEntrance") enptrySetting := getSettingByKey(db, "EncryptKey") @@ -50,10 +51,16 @@ var userinfoCmd = &cobra.Command{ p = password } - fmt.Printf("entrance: %s\n", entrance) + protocol := "http" + if ssl == "enable" { + protocol = "https" + } + fmt.Printf("username: %s\n", user) fmt.Printf("password: %s\n", p) fmt.Printf("port: %s\n", port) + fmt.Printf("protocol: %s\n", protocol) + fmt.Printf("entrance: %s\n", entrance) return nil }, } diff --git a/frontend/src/views/setting/safe/ssl/index.vue b/frontend/src/views/setting/safe/ssl/index.vue index f7d9d8d0b..4f39eda96 100644 --- a/frontend/src/views/setting/safe/ssl/index.vue +++ b/frontend/src/views/setting/safe/ssl/index.vue @@ -78,7 +78,7 @@