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

Method GetSetting

model/user.go:73–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73func (user *User) GetSetting() dto.UserSetting {
74 setting := dto.UserSetting{}
75 if user.Setting != "" {
76 err := json.Unmarshal([]byte(user.Setting), &setting)
77 if err != nil {
78 common.SysError("failed to unmarshal setting: " + err.Error())
79 }
80 }
81 return setting
82}
83
84func (user *User) SetSetting(setting dto.UserSetting) {
85 settingBytes, err := json.Marshal(setting)

Callers 3

NotifyRootUserFunction · 0.45
RelayMidjourneyImageFunction · 0.45

Calls 2

SysErrorFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected