From 26e88ded8afd69814514ce78f0ab8bf5a6b6b23b Mon Sep 17 00:00:00 2001 From: dushixiang <798148596@qq.com> Date: Tue, 29 Dec 2020 00:07:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dssh=E7=A7=81=E9=92=A5?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=B6=E5=AF=86=E7=A0=81=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/api/asset.go | 6 ++++++ web/src/common/constants.js | 14 +++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pkg/api/asset.go b/pkg/api/asset.go index 625b0ac..188640c 100644 --- a/pkg/api/asset.go +++ b/pkg/api/asset.go @@ -60,6 +60,12 @@ func AssetUpdateEndpoint(c echo.Context) error { case "private-key": item.Password = "-" item.CredentialId = "-" + if len(item.Username) == 0 { + item.Username = "-" + } + if len(item.Passphrase) == 0 { + item.Passphrase = "-" + } case "custom": item.PrivateKey = "-" item.Passphrase = "-" diff --git a/web/src/common/constants.js b/web/src/common/constants.js index bdea679..6b81e3c 100644 --- a/web/src/common/constants.js +++ b/web/src/common/constants.js @@ -1,15 +1,11 @@ // prod -// export const server = ''; -// export const wsServer = ''; -// export const prefix = ''; - -// dev -export const server = '//127.0.0.1:8088'; -export const wsServer = 'ws://127.0.0.1:8088'; +export const server = ''; +export const wsServer = ''; export const prefix = ''; -// export const server = '//172.16.101.32:8080'; -// export const wsServer = 'ws://172.16.101.32:8080'; +// dev +// export const server = '//127.0.0.1:8088'; +// export const wsServer = 'ws://127.0.0.1:8088'; // export const prefix = ''; export const PROTOCOL_COLORS = {