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

Function DeltaUpdateUserQuota

model/user.go:715–724  ·  view source on GitHub ↗
(id int, delta int)

Source from the content-addressed store, hash-verified

713}
714
715func DeltaUpdateUserQuota(id int, delta int) (err error) {
716 if delta == 0 {
717 return nil
718 }
719 if delta > 0 {
720 return IncreaseUserQuota(id, delta, false)
721 } else {
722 return DecreaseUserQuota(id, -delta)
723 }
724}
725
726//func GetRootUserEmail() (email string) {
727// DB.Model(&User{}).Where("role = ?", common.RoleRootUser).Select("email").Find(&email)

Callers

nothing calls this directly

Calls 2

IncreaseUserQuotaFunction · 0.85
DecreaseUserQuotaFunction · 0.85

Tested by

no test coverage detected