mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-08 23:23:42 +08:00
feat: 改为转发的方式获取midjourney图片
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package model
|
||||
|
||||
import "one-api/common"
|
||||
|
||||
type Midjourney struct {
|
||||
Id int `json:"id"`
|
||||
Code int `json:"code"`
|
||||
@@ -27,6 +29,9 @@ func GetAllUserTask(userId int, startIdx int, num int) []*Midjourney {
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
for _, task := range tasks {
|
||||
task.ImageUrl = common.ServerAddress + "/mj/image/" + task.MjId
|
||||
}
|
||||
return tasks
|
||||
}
|
||||
|
||||
@@ -37,6 +42,9 @@ func GetAllTasks(startIdx int, num int) []*Midjourney {
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
for _, task := range tasks {
|
||||
task.ImageUrl = common.ServerAddress + "/mj/image/" + task.MjId
|
||||
}
|
||||
return tasks
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user