mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-07 17:53:42 +08:00
suno and luma task management funtion in admin console is ready
This commit is contained in:
@@ -180,12 +180,7 @@ func (h *DallJobHandler) Remove(c *gin.Context) {
|
||||
|
||||
// 删除任务
|
||||
tx := h.DB.Begin()
|
||||
if err := tx.Delete(&job).Error; err != nil {
|
||||
tx.Rollback()
|
||||
resp.ERROR(c, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
tx.Delete(&job)
|
||||
// 如果任务未完成,或者任务失败,则恢复用户算力
|
||||
if job.Progress != 100 {
|
||||
err := h.userService.IncreasePower(int(job.UserId), job.Power, model.PowerLog{
|
||||
|
||||
Reference in New Issue
Block a user