fix bug for remove api 404 errorc

This commit is contained in:
RockYang
2024-04-06 20:36:52 +08:00
parent 7873847616
commit 86b2d5eff2
9 changed files with 19 additions and 22 deletions

View File

@@ -130,6 +130,7 @@ func (s *Service) Run() {
atomic.AddInt32(&s.HandledTaskNum, 1)
// 更新任务 ID/频道
job.TaskId = res.Result
job.MessageId = res.Result
job.ChannelId = s.Name
s.db.Updates(&job)
}
@@ -198,7 +199,6 @@ func (s *Service) Notify(job model.MidJourneyJob) error {
if task.ImageUrl != "" {
job.OrgURL = task.ImageUrl
}
job.MessageId = task.Id
tx := s.db.Updates(&job)
if tx.Error != nil {
return fmt.Errorf("error with update database: %v", tx.Error)