feat: add midjourney log

This commit is contained in:
CaIon 2023-09-12 03:17:26 +08:00
parent 4a836a4cb6
commit 4895bd744a
5 changed files with 8 additions and 7 deletions

View File

@ -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 {
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 {

View File

@ -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>

View File

@ -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}{' '}

View File

@ -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;
} }

View File

@ -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>
</> : <> </> : <>