From 4895bd744aaa35cc37cf5512ae47651978e41d89 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Tue, 12 Sep 2023 03:17:26 +0800 Subject: [PATCH] feat: add midjourney log --- controller/relay-mj.go | 3 ++- web/public/index.html | 2 +- web/src/components/Footer.js | 2 +- web/src/helpers/utils.js | 2 +- web/src/pages/About/index.js | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/controller/relay-mj.go b/controller/relay-mj.go index 3b0f762a..f8bd751d 100644 --- a/controller/relay-mj.go +++ b/controller/relay-mj.go @@ -9,6 +9,7 @@ import ( "net/http" "one-api/common" "one-api/model" + "strconv" "strings" "github.com/gin-gonic/gin" @@ -327,7 +328,7 @@ func relayMidjourneySubmit(c *gin.Context, relayMode int) *MidjourneyResponse { if resp.StatusCode != 200 { return &MidjourneyResponse{ Code: 4, - Description: "fail_to_fetch_midjourney", + Description: "fail_to_fetch_midjourney status_code: " + strconv.Itoa(resp.StatusCode), } } if err != nil { diff --git a/web/public/index.html b/web/public/index.html index b8e324d2..f982bf43 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -9,7 +9,7 @@ name="description" content="OpenAI 接口聚合管理,支持多种渠道包括 Azure,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用" /> - One API + One API Midjourney diff --git a/web/src/components/Footer.js b/web/src/components/Footer.js index 334ee379..0dfbb230 100644 --- a/web/src/components/Footer.js +++ b/web/src/components/Footer.js @@ -38,7 +38,7 @@ const Footer = () => { ) : (
{systemName} {process.env.REACT_APP_VERSION}{' '} diff --git a/web/src/helpers/utils.js b/web/src/helpers/utils.js index 3871a43e..399b7e89 100644 --- a/web/src/helpers/utils.js +++ b/web/src/helpers/utils.js @@ -22,7 +22,7 @@ export function isRoot() { export function getSystemName() { let system_name = localStorage.getItem('system_name'); - if (!system_name) return 'One API'; + if (!system_name) return 'One API Midjourney'; return system_name; } diff --git a/web/src/pages/About/index.js b/web/src/pages/About/index.js index ec13f151..253353cf 100644 --- a/web/src/pages/About/index.js +++ b/web/src/pages/About/index.js @@ -36,9 +36,9 @@ const About = () => {
关于

可在设置页面设置关于内容,支持 HTML & Markdown

- 项目仓库地址: -
- https://github.com/songquanpeng/one-api + 魔改版项目仓库地址: + + https://github.com/Calcium-Ion/one-api : <>