mirror of
				https://github.com/yangjian102621/geekai.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix: fix bug for issue 49, stable diffusion service not decrease img_calls
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user