mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 17:26:38 +08:00
fix: fix bug for issue 49, stable diffusion service not decrease img_calls
This commit is contained in:
parent
7b4ef8fc31
commit
2525a22d78
@ -287,7 +287,8 @@ func (s *Service) callback(data CBReq) {
|
||||
if data.Progress < 100 && data.ImageData != "" {
|
||||
jobVo.ImgURL = data.ImageData
|
||||
}
|
||||
|
||||
// 扣减绘图次数
|
||||
s.db.Where("id = ?", jobVo.UserId).UpdateColumn("img_calls", gorm.Expr("img_calls - ?", 1))
|
||||
// 推送任务到前端
|
||||
if client != nil {
|
||||
utils.ReplyChunkMessage(client, jobVo)
|
||||
|
Loading…
Reference in New Issue
Block a user