show error message for Midjourney task list page

This commit is contained in:
RockYang
2024-07-16 17:16:58 +08:00
parent 24a21bf2ee
commit 024f00b73c
8 changed files with 95 additions and 336 deletions

View File

@@ -406,7 +406,7 @@ func (h *MidJourneyHandler) JobList(c *gin.Context) {
func (h *MidJourneyHandler) getData(finish bool, userId uint, page int, pageSize int, publish bool) (error, []vo.MidJourneyJob) {
session := h.DB.Session(&gorm.Session{})
if finish {
session = session.Where("progress = ?", 100).Order("id DESC")
session = session.Where("progress >= ?", 100).Order("id DESC")
} else {
session = session.Where("progress < ?", 100).Order("id ASC")
}