mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-20 02:06:38 +08:00
fix: deducating the user's img call quota after stable diffusion callback
This commit is contained in:
parent
00de18be9a
commit
576adc9036
@ -288,7 +288,7 @@ func (s *Service) callback(data CBReq) {
|
||||
jobVo.ImgURL = data.ImageData
|
||||
}
|
||||
// 扣减绘图次数
|
||||
s.db.Where("id = ?", jobVo.UserId).UpdateColumn("img_calls", gorm.Expr("img_calls - ?", 1))
|
||||
s.db.Model(&model.User{}).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