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

Function updateChannelUsedQuota

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

Source from the content-addressed store, hash-verified

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
700 if err != nil {
701 common.SysError("failed to update channel used quota: " + err.Error())
702 }
703}
704
705func DeleteChannelByStatus(status int64) (int64, error) {
706 result := DB.Where("status = ?", status).Delete(&Channel{})

Callers 2

batchUpdateFunction · 0.85
UpdateChannelUsedQuotaFunction · 0.85

Calls 3

SysErrorFunction · 0.92
ErrorMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected