MCPcopy
hub / github.com/QuantumNous/new-api / GetSetting

Method GetSetting

model/user_cache.go:36–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func (user *UserBase) GetSetting() dto.UserSetting {
37 setting := dto.UserSetting{}
38 if user.Setting != "" {
39 err := common.Unmarshal([]byte(user.Setting), &setting)
40 if err != nil {
41 common.SysLog("failed to unmarshal setting: " + err.Error())
42 }
43 }
44 return setting
45}
46
47// getUserCacheKey returns the key for user cache
48func 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