MCPcopy
hub / github.com/songquanpeng/one-api / increaseUserQuota

Function increaseUserQuota

model/user.go:382–385  ·  view source on GitHub ↗
(id int, quota int64)

Source from the content-addressed store, hash-verified

380}
381
382func increaseUserQuota(id int, quota int64) (err error) {
383 err = DB.Model(&User{}).Where("id = ?", id).Update("quota", gorm.Expr("quota + ?", quota)).Error
384 return err
385}
386
387func DecreaseUserQuota(id int, quota int64) (err error) {
388 if quota < 0 {

Callers 2

batchUpdateFunction · 0.85
IncreaseUserQuotaFunction · 0.85

Calls 1

UpdateMethod · 0.45

Tested by

no test coverage detected