Browse Source

feat: 1pctl user-info 返回增加 protocol 信息 (#781)

pull/784/head
ssongliu 2 years ago committed by GitHub
parent
commit
79622f324b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      cmd/server/cmd/user-info.go
  2. 2
      frontend/src/views/setting/safe/ssl/index.vue

9
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
},
}

2
frontend/src/views/setting/safe/ssl/index.vue

@ -78,7 +78,7 @@
</div>
</template>
<script lang="ts" setup>
import { Website } from '@/api/interface/Website';
import { Website } from '@/api/interface/website';
import { loadSSLInfo } from '@/api/modules/setting';
import { dateFormatSimple, getProvider } from '@/utils/util';
import { ListSSL } from '@/api/modules/website';

Loading…
Cancel
Save