|
@@ -1,5 +1,7 @@
|
|
|
package model
|
|
package model
|
|
|
|
|
|
|
|
|
|
+import "one-api/common"
|
|
|
|
|
+
|
|
|
type Midjourney struct {
|
|
type Midjourney struct {
|
|
|
Id int `json:"id"`
|
|
Id int `json:"id"`
|
|
|
Code int `json:"code"`
|
|
Code int `json:"code"`
|
|
@@ -27,6 +29,9 @@ func GetAllUserTask(userId int, startIdx int, num int) []*Midjourney {
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
|
|
+ for _, task := range tasks {
|
|
|
|
|
+ task.ImageUrl = common.ServerAddress + "/mj/image/" + task.MjId
|
|
|
|
|
+ }
|
|
|
return tasks
|
|
return tasks
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -37,6 +42,9 @@ func GetAllTasks(startIdx int, num int) []*Midjourney {
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
|
|
+ for _, task := range tasks {
|
|
|
|
|
+ task.ImageUrl = common.ServerAddress + "/mj/image/" + task.MjId
|
|
|
|
|
+ }
|
|
|
return tasks
|
|
return tasks
|
|
|
}
|
|
}
|
|
|
|
|
|