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

Method GetSetting

model/user_cache.go:38–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36}
37
38func (user *UserBase) GetSetting() dto.UserSetting {
39 setting := dto.UserSetting{}
40 if user.Setting != "" {
41 err := common.Unmarshal([]byte(user.Setting), &setting)
42 if err != nil {
43 common.SysLog("failed to unmarshal setting: " + err.Error())
44 }
45 }
46 return setting
47}
48
49// getUserCacheKey returns the key for user cache
50func getUserCacheKey(userId int) string {

Callers 4

WriteContextMethod · 0.95
GetUserSettingFunction · 0.95
getUserSettingCacheFunction · 0.45
GetUserLanguageFunction · 0.45

Calls 3

UnmarshalFunction · 0.92
SysLogFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected