MCPcopy Create free account
hub / github.com/QuantumNous/new-api / updateUserStatusCache

Function updateUserStatusCache

model/user_cache.go:200–206  ·  view source on GitHub ↗

New functions for individual field updates

(userId int, status bool)

Source from the content-addressed store, hash-verified

198
199// New functions for individual field updates
200func updateUserStatusCache(userId int, status bool) error {
201 statusInt := common.UserStatusEnabled
202 if !status {
203 statusInt = common.UserStatusDisabled
204 }
205 return updateUserCacheField(userId, "Status", statusInt)
206}
207
208func updateUserQuotaCache(userId int, quota int) error {
209 if !common.RedisEnabled {

Callers

nothing calls this directly

Calls 1

updateUserCacheFieldFunction · 0.85

Tested by

no test coverage detected