Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
45543411
authored
Jun 22, 2025
by
Calcium-Ion
Committed by
GitHub
Jun 22, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1279 from feitianbubu/add-kling-key-placeholder
feat: add placeholder for kling AccessKey and SecretKey
parents
e69f4199
1add4bf9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
relay/channel/task/kling/adaptor.go
+3
-3
web/src/pages/Channel/EditChannel.js
+2
-0
No files found.
relay/channel/task/kling/adaptor.go
View file @
45543411
...
@@ -69,8 +69,8 @@ func (a *TaskAdaptor) Init(info *relaycommon.TaskRelayInfo) {
...
@@ -69,8 +69,8 @@ func (a *TaskAdaptor) Init(info *relaycommon.TaskRelayInfo) {
a
.
ChannelType
=
info
.
ChannelType
a
.
ChannelType
=
info
.
ChannelType
a
.
baseURL
=
info
.
BaseUrl
a
.
baseURL
=
info
.
BaseUrl
// apiKey format: "access_key
,
secret_key"
// apiKey format: "access_key
|
secret_key"
keyParts
:=
strings
.
Split
(
info
.
ApiKey
,
"
,
"
)
keyParts
:=
strings
.
Split
(
info
.
ApiKey
,
"
|
"
)
if
len
(
keyParts
)
==
2
{
if
len
(
keyParts
)
==
2
{
a
.
accessKey
=
strings
.
TrimSpace
(
keyParts
[
0
])
a
.
accessKey
=
strings
.
TrimSpace
(
keyParts
[
0
])
a
.
secretKey
=
strings
.
TrimSpace
(
keyParts
[
1
])
a
.
secretKey
=
strings
.
TrimSpace
(
keyParts
[
1
])
...
@@ -264,7 +264,7 @@ func (a *TaskAdaptor) createJWTToken() (string, error) {
...
@@ -264,7 +264,7 @@ func (a *TaskAdaptor) createJWTToken() (string, error) {
}
}
func
(
a
*
TaskAdaptor
)
createJWTTokenWithKey
(
apiKey
string
)
(
string
,
error
)
{
func
(
a
*
TaskAdaptor
)
createJWTTokenWithKey
(
apiKey
string
)
(
string
,
error
)
{
parts
:=
strings
.
Split
(
apiKey
,
"
,
"
)
parts
:=
strings
.
Split
(
apiKey
,
"
|
"
)
if
len
(
parts
)
!=
2
{
if
len
(
parts
)
!=
2
{
return
""
,
fmt
.
Errorf
(
"invalid API key format, expected 'access_key,secret_key'"
)
return
""
,
fmt
.
Errorf
(
"invalid API key format, expected 'access_key,secret_key'"
)
}
}
...
...
web/src/pages/Channel/EditChannel.js
View file @
45543411
...
@@ -64,6 +64,8 @@ function type2secretPrompt(type) {
...
@@ -64,6 +64,8 @@ function type2secretPrompt(type) {
return
'按照如下格式输入:AppId|SecretId|SecretKey'
;
return
'按照如下格式输入:AppId|SecretId|SecretKey'
;
case
33
:
case
33
:
return
'按照如下格式输入:Ak|Sk|Region'
;
return
'按照如下格式输入:Ak|Sk|Region'
;
case
50
:
return
'按照如下格式输入: AccessKey|SecretKey'
;
default
:
default
:
return
'请输入渠道对应的鉴权密钥'
;
return
'请输入渠道对应的鉴权密钥'
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment