feat: support CDN reverse proxy for MidJourney and OpenAI API

This commit is contained in:
RockYang
2023-12-22 17:25:31 +08:00
parent de512a5ea2
commit 3ab930a107
19 changed files with 218 additions and 87 deletions

View File

@@ -612,8 +612,9 @@ onMounted(() => {
// 获取已完成的任务
const fetchFinishJobs = (userId) => {
httpGet(`/api/sd/jobs?status=1&user_id=${userId}`).then(res => {
if (finishedJobs.value.length === 0) {
if (finishedJobs.value.length === 0 || res.data.length > finishedJobs.value.length) {
finishedJobs.value = res.data
setTimeout(() => fetchFinishJobs(userId), 1000)
return
}