MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / UpdateChannelUsedQuota

Function UpdateChannelUsedQuota

model/channel.go:690–696  ·  view source on GitHub ↗
(id int, quota int)

Source from the content-addressed store, hash-verified

688}
689
690func UpdateChannelUsedQuota(id int, quota int) {
691 if common.BatchUpdateEnabled {
692 addNewRecord(BatchUpdateTypeChannelUsedQuota, id, quota)
693 return
694 }
695 updateChannelUsedQuota(id, quota)
696}
697
698func updateChannelUsedQuota(id int, quota int) {
699 err := DB.Model(&Channel{}).Where("id = ?", id).Update("used_quota", gorm.Expr("used_quota + ?", quota)).Error

Callers 7

PostWssConsumeQuotaFunction · 0.92
PostClaudeConsumeQuotaFunction · 0.92
PostAudioConsumeQuotaFunction · 0.92
RelaySwapFaceFunction · 0.92
RelayMidjourneySubmitFunction · 0.92
postConsumeQuotaFunction · 0.92
RelayTaskSubmitFunction · 0.92

Calls 2

addNewRecordFunction · 0.85
updateChannelUsedQuotaFunction · 0.85

Tested by

no test coverage detected