Skip to content

Commit ee8956b

Browse files
authored
Merge pull request songquanpeng#1279 from feitianbubu/add-kling-key-placeholder
feat: add placeholder for kling AccessKey and SecretKey
2 parents 5ad9f8d + e4def06 commit ee8956b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

relay/channel/task/kling/adaptor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ func (a *TaskAdaptor) Init(info *relaycommon.TaskRelayInfo) {
6969
a.ChannelType = info.ChannelType
7070
a.baseURL = info.BaseUrl
7171

72-
// apiKey format: "access_key,secret_key"
73-
keyParts := strings.Split(info.ApiKey, ",")
72+
// apiKey format: "access_key|secret_key"
73+
keyParts := strings.Split(info.ApiKey, "|")
7474
if len(keyParts) == 2 {
7575
a.accessKey = strings.TrimSpace(keyParts[0])
7676
a.secretKey = strings.TrimSpace(keyParts[1])
@@ -264,7 +264,7 @@ func (a *TaskAdaptor) createJWTToken() (string, error) {
264264
}
265265

266266
func (a *TaskAdaptor) createJWTTokenWithKey(apiKey string) (string, error) {
267-
parts := strings.Split(apiKey, ",")
267+
parts := strings.Split(apiKey, "|")
268268
if len(parts) != 2 {
269269
return "", fmt.Errorf("invalid API key format, expected 'access_key,secret_key'")
270270
}

web/src/pages/Channel/EditChannel.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ function type2secretPrompt(type) {
6464
return '按照如下格式输入:AppId|SecretId|SecretKey';
6565
case 33:
6666
return '按照如下格式输入:Ak|Sk|Region';
67+
case 50:
68+
return '按照如下格式输入: AccessKey|SecretKey';
6769
default:
6870
return '请输入渠道对应的鉴权密钥';
6971
}

0 commit comments

Comments
 (0)