MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / setSettingByKey

Function setSettingByKey

core/cmd/server/cmd/root.go:77–79  ·  view source on GitHub ↗
(db *gorm.DB, key, value string)

Source from the content-addressed store, hash-verified

75}
76
77func setSettingByKey(db *gorm.DB, key, value string) error {
78 return db.Model(&setting{}).Where("key = ?", key).Updates(map[string]interface{}{"value": value}).Error
79}
80
81func isRoot() bool {
82 currentUser, err := user.Current()

Callers 6

updateBindInfoFunction · 0.85
reset.goFile · 0.85
update.goFile · 0.85
usernameFunction · 0.85
passwordFunction · 0.85
portFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected