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
aaf7c88e
authored
Jun 17, 2025
by
skynono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add video channel kling fix
parent
d7ed0214
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
controller/task_video.go
+1
-3
relay/channel/task/kling/adaptor.go
+1
-1
No files found.
controller/task_video.go
View file @
aaf7c88e
...
@@ -104,9 +104,7 @@ func updateVideoSingleTask(ctx context.Context, adaptor channel.TaskAdaptor, cha
...
@@ -104,9 +104,7 @@ func updateVideoSingleTask(ctx context.Context, adaptor channel.TaskAdaptor, cha
case
"succeed"
:
case
"succeed"
:
task
.
Status
=
model
.
TaskStatusSuccess
task
.
Status
=
model
.
TaskStatusSuccess
task
.
Progress
=
"100%"
task
.
Progress
=
"100%"
if
url
,
err
:=
adaptor
.
(
interface
{
if
url
,
err
:=
adaptor
.
ParseResultUrl
(
responseItem
);
err
==
nil
{
ParseResultUrl
(
map
[
string
]
any
)
(
string
,
error
)
})
.
ParseResultUrl
(
responseItem
);
err
==
nil
{
task
.
FailReason
=
url
task
.
FailReason
=
url
}
else
{
}
else
{
common
.
LogWarn
(
ctx
,
fmt
.
Sprintf
(
"Failed to get url from body for task %s: %s"
,
task
.
TaskID
,
err
.
Error
()))
common
.
LogWarn
(
ctx
,
fmt
.
Sprintf
(
"Failed to get url from body for task %s: %s"
,
task
.
TaskID
,
err
.
Error
()))
...
...
relay/channel/task/kling/adaptor.go
View file @
aaf7c88e
...
@@ -107,7 +107,7 @@ func (a *TaskAdaptor) BuildRequestURL(info *relaycommon.TaskRelayInfo) (string,
...
@@ -107,7 +107,7 @@ func (a *TaskAdaptor) BuildRequestURL(info *relaycommon.TaskRelayInfo) (string,
func
(
a
*
TaskAdaptor
)
BuildRequestHeader
(
c
*
gin
.
Context
,
req
*
http
.
Request
,
info
*
relaycommon
.
TaskRelayInfo
)
error
{
func
(
a
*
TaskAdaptor
)
BuildRequestHeader
(
c
*
gin
.
Context
,
req
*
http
.
Request
,
info
*
relaycommon
.
TaskRelayInfo
)
error
{
token
,
err
:=
a
.
createJWTToken
()
token
,
err
:=
a
.
createJWTToken
()
if
err
!=
nil
{
if
err
!=
nil
{
token
=
info
.
ApiKey
// fallback
return
fmt
.
Errorf
(
"failed to create JWT token: %w"
,
err
)
}
}
req
.
Header
.
Set
(
"Content-Type"
,
"application/json"
)
req
.
Header
.
Set
(
"Content-Type"
,
"application/json"
)
...
...
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