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

Function increaseUserQuota

model/user.go:682–688  ·  view source on GitHub ↗
(id int, quota int)

Source from the content-addressed store, hash-verified

680}
681
682func increaseUserQuota(id int, quota int) (err error) {
683 err = DB.Model(&User{}).Where("id = ?", id).Update("quota", gorm.Expr("quota + ?", quota)).Error
684 if err != nil {
685 return err
686 }
687 return err
688}
689
690func DecreaseUserQuota(id int, quota int) (err error) {
691 if quota < 0 {

Callers 2

batchUpdateFunction · 0.85
IncreaseUserQuotaFunction · 0.85

Calls 1

UpdateMethod · 0.45

Tested by

no test coverage detected