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
f8f0ee1e
authored
Aug 15, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: initialize channel metadata in mjproxy and relay processing
parent
f6ee0b97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
controller/relay.go
+0
-2
relay/mjproxy_handler.go
+5
-0
No files found.
controller/relay.go
View file @
f8f0ee1e
...
...
@@ -318,8 +318,6 @@ func RelayMidjourney(c *gin.Context) {
return
}
relayInfo
.
InitChannelMeta
(
c
)
var
mjErr
*
dto
.
MidjourneyResponse
switch
relayInfo
.
RelayMode
{
case
relayconstant
.
RelayModeMidjourneyNotify
:
...
...
relay/mjproxy_handler.go
View file @
f8f0ee1e
...
...
@@ -176,6 +176,9 @@ func RelaySwapFace(c *gin.Context, info *relaycommon.RelayInfo) *dto.MidjourneyR
if
err
!=
nil
{
return
service
.
MidjourneyErrorWrapper
(
constant
.
MjRequestError
,
"bind_request_body_failed"
)
}
info
.
InitChannelMeta
(
c
)
if
swapFaceRequest
.
SourceBase64
==
""
||
swapFaceRequest
.
TargetBase64
==
""
{
return
service
.
MidjourneyErrorWrapper
(
constant
.
MjRequestError
,
"sour_base64_and_target_base64_is_required"
)
}
...
...
@@ -370,6 +373,8 @@ func RelayMidjourneySubmit(c *gin.Context, relayInfo *relaycommon.RelayInfo) *dt
return
service
.
MidjourneyErrorWrapper
(
constant
.
MjRequestError
,
"bind_request_body_failed"
)
}
relayInfo
.
InitChannelMeta
(
c
)
if
relayInfo
.
RelayMode
==
relayconstant
.
RelayModeMidjourneyAction
{
// midjourney plus,需要从customId中获取任务信息
mjErr
:=
service
.
CoverPlusActionToNormalAction
(
&
midjRequest
)
if
mjErr
!=
nil
{
...
...
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