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
8e4df1e2
authored
Mar 29, 2024
by
Xiangyuan Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 支持 /mj-{mode} 路径
parent
a602db43
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
relay/constant/relay_mode.go
+10
-10
No files found.
relay/constant/relay_mode.go
View file @
8e4df1e2
...
@@ -56,29 +56,29 @@ func Path2RelayMode(path string) int {
...
@@ -56,29 +56,29 @@ func Path2RelayMode(path string) int {
func
Path2RelayModeMidjourney
(
path
string
)
int
{
func
Path2RelayModeMidjourney
(
path
string
)
int
{
relayMode
:=
RelayModeUnknown
relayMode
:=
RelayModeUnknown
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/action"
)
{
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/action"
)
{
// midjourney plus
// midjourney plus
relayMode
=
RelayModeMidjourneyAction
relayMode
=
RelayModeMidjourneyAction
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/modal"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/modal"
)
{
// midjourney plus
// midjourney plus
relayMode
=
RelayModeMidjourneyModal
relayMode
=
RelayModeMidjourneyModal
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/shorten"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/shorten"
)
{
// midjourney plus
// midjourney plus
relayMode
=
RelayModeMidjourneyShorten
relayMode
=
RelayModeMidjourneyShorten
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/insight-face/swap"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/insight-face/swap"
)
{
// midjourney plus
// midjourney plus
relayMode
=
RelayModeSwapFace
relayMode
=
RelayModeSwapFace
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/imagine"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/imagine"
)
{
relayMode
=
RelayModeMidjourneyImagine
relayMode
=
RelayModeMidjourneyImagine
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/blend"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/blend"
)
{
relayMode
=
RelayModeMidjourneyBlend
relayMode
=
RelayModeMidjourneyBlend
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/describe"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/describe"
)
{
relayMode
=
RelayModeMidjourneyDescribe
relayMode
=
RelayModeMidjourneyDescribe
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/notify"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/notify"
)
{
relayMode
=
RelayModeMidjourneyNotify
relayMode
=
RelayModeMidjourneyNotify
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/change"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/change"
)
{
relayMode
=
RelayModeMidjourneyChange
relayMode
=
RelayModeMidjourneyChange
}
else
if
strings
.
Has
Pre
fix
(
path
,
"/mj/submit/simple-change"
)
{
}
else
if
strings
.
Has
Suf
fix
(
path
,
"/mj/submit/simple-change"
)
{
relayMode
=
RelayModeMidjourneyChange
relayMode
=
RelayModeMidjourneyChange
}
else
if
strings
.
HasSuffix
(
path
,
"/fetch"
)
{
}
else
if
strings
.
HasSuffix
(
path
,
"/fetch"
)
{
relayMode
=
RelayModeMidjourneyTaskFetch
relayMode
=
RelayModeMidjourneyTaskFetch
...
...
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