|
|
@ -14,7 +14,7 @@ func UpdateConfig(userid interface{}, key string, value string) {
|
|
|
|
config := FindConfigByUserId(userid, key)
|
|
|
|
config := FindConfigByUserId(userid, key)
|
|
|
|
if config.ID != 0 {
|
|
|
|
if config.ID != 0 {
|
|
|
|
config.ConfValue = value
|
|
|
|
config.ConfValue = value
|
|
|
|
DB.Where("user_id = ? and conf_key = ?", userid, key).Update(config)
|
|
|
|
DB.Model(&Config{}).Where("user_id = ? and conf_key = ?", userid, key).Update(config)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
newConfig := &Config{
|
|
|
|
newConfig := &Config{
|
|
|
|
ID: 0,
|
|
|
|
ID: 0,
|
|
|
|