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
06fc41d9
authored
Sep 12, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add midjourney log
parent
57edbac3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
controller/relay-mj.go
+2
-1
web/public/index.html
+1
-1
web/src/components/Footer.js
+1
-1
web/src/helpers/utils.js
+1
-1
web/src/pages/About/index.js
+3
-3
No files found.
controller/relay-mj.go
View file @
06fc41d9
...
@@ -9,6 +9,7 @@ import (
...
@@ -9,6 +9,7 @@ import (
"net/http"
"net/http"
"one-api/common"
"one-api/common"
"one-api/model"
"one-api/model"
"strconv"
"strings"
"strings"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
...
@@ -327,7 +328,7 @@ func relayMidjourneySubmit(c *gin.Context, relayMode int) *MidjourneyResponse {
...
@@ -327,7 +328,7 @@ func relayMidjourneySubmit(c *gin.Context, relayMode int) *MidjourneyResponse {
if
resp
.
StatusCode
!=
200
{
if
resp
.
StatusCode
!=
200
{
return
&
MidjourneyResponse
{
return
&
MidjourneyResponse
{
Code
:
4
,
Code
:
4
,
Description
:
"fail_to_fetch_midjourney
"
,
Description
:
"fail_to_fetch_midjourney
status_code: "
+
strconv
.
Itoa
(
resp
.
StatusCode
)
,
}
}
}
}
if
err
!=
nil
{
if
err
!=
nil
{
...
...
web/public/index.html
View file @
06fc41d9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
name=
"description"
name=
"description"
content=
"OpenAI 接口聚合管理,支持多种渠道包括 Azure,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用"
content=
"OpenAI 接口聚合管理,支持多种渠道包括 Azure,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用"
/>
/>
<title>
One API
</title>
<title>
One API
Midjourney
</title>
</head>
</head>
<body>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
...
...
web/src/components/Footer.js
View file @
06fc41d9
...
@@ -38,7 +38,7 @@ const Footer = () => {
...
@@ -38,7 +38,7 @@ const Footer = () => {
)
:
(
)
:
(
<
div
className
=
'custom-footer'
>
<
div
className
=
'custom-footer'
>
<
a
<
a
href
=
'https://github.com/
songquanpeng
/one-api'
href
=
'https://github.com/
Calcium-Ion
/one-api'
target
=
'_blank'
target
=
'_blank'
>
>
{
systemName
}
{
process
.
env
.
REACT_APP_VERSION
}{
' '
}
{
systemName
}
{
process
.
env
.
REACT_APP_VERSION
}{
' '
}
...
...
web/src/helpers/utils.js
View file @
06fc41d9
...
@@ -22,7 +22,7 @@ export function isRoot() {
...
@@ -22,7 +22,7 @@ export function isRoot() {
export
function
getSystemName
()
{
export
function
getSystemName
()
{
let
system_name
=
localStorage
.
getItem
(
'system_name'
);
let
system_name
=
localStorage
.
getItem
(
'system_name'
);
if
(
!
system_name
)
return
'One API'
;
if
(
!
system_name
)
return
'One API
Midjourney
'
;
return
system_name
;
return
system_name
;
}
}
...
...
web/src/pages/About/index.js
View file @
06fc41d9
...
@@ -36,9 +36,9 @@ const About = () => {
...
@@ -36,9 +36,9 @@ const About = () => {
<
Segment
>
<
Segment
>
<
Header
as
=
'h3'
>
关于
<
/Header
>
<
Header
as
=
'h3'
>
关于
<
/Header
>
<
p
>
可在设置页面设置关于内容,支持
HTML
&
Markdown
<
/p
>
<
p
>
可在设置页面设置关于内容,支持
HTML
&
Markdown
<
/p
>
项目仓库地址:
魔改版
项目仓库地址:
<
a
href
=
'https://github.com/
songquanpeng
/one-api'
>
<
a
href
=
'https://github.com/
Calcium-Ion
/one-api'
>
https
:
//github.com/
songquanpeng
/one-api
https
:
//github.com/
Calcium-Ion
/one-api
<
/a
>
<
/a
>
<
/Segment
>
<
/Segment
>
<
/> : <
>
<
/> : <
>
...
...
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