修复余额不足邮件提醒bug

This commit is contained in:
CaIon
2023-11-12 18:51:26 +08:00
parent 2c9b83fd1d
commit 04fe42c634
5 changed files with 40 additions and 39 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ func relayImageHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode
var textResponse ImageResponse
defer func(ctx context.Context) {
if consumeQuota {
err := model.PostConsumeTokenQuota(tokenId, quota)
err := model.PostConsumeTokenQuota(tokenId, userId, quota, 0)
if err != nil {
common.SysError("error consuming token remain quota: " + err.Error())
}