- QueryConfigs在无结果且key不为空时才返回错误

This commit is contained in:
gazebo
2019-07-17 09:53:32 +08:00
parent b50c505336
commit 178e7d2dfa
3 changed files with 9 additions and 4 deletions

View File

@@ -249,6 +249,9 @@ func DeleteConfig(ctx *jxcontext.Context, key, configType string) (err error) {
}
func UpdateConfig(ctx *jxcontext.Context, key, configType, value string) (err error) {
if key == "" {
return fmt.Errorf("修改配置必须给定key")
}
if err = checkConfig(configType, value); err != nil {
return err
}