mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 23:32:02 +00:00
use correct entity type when updating config-types (#1124)
use correct entity type when updating config-types. put schema in "schema" path when updating entity.
This commit is contained in:
@@ -216,4 +216,5 @@ Example output:
|
||||
* [Issue #1013](https://github.com/openziti/ziti/issues/1013) - docker env password is renewed at each `docker-compose up`
|
||||
* [Issue #1077](https://github.com/openziti/ziti/issues/1077) - Show auth-policy name on identity list instead of id
|
||||
* [Issue #1119](https://github.com/openziti/ziti/issues/1119) - intercept.v1 config should permit underscores in the address
|
||||
* [Issue #1123](https://github.com/openziti/ziti/issues/1123) - cannot update config types with ziti cli
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ func newUpdateConfigTypeCmd(out io.Writer, errOut io.Writer) *cobra.Command {
|
||||
|
||||
// runUpdateConfigType update a new config on the Ziti Edge Controller
|
||||
func (self *updateConfigTypeAction) run() error {
|
||||
id, err := mapNameToID("configs", self.Args[0], self.Options)
|
||||
id, err := mapNameToID("config-types", self.Args[0], self.Options)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -108,7 +108,7 @@ func (self *updateConfigTypeAction) run() error {
|
||||
fmt.Printf("Failing parsing JSON: %+v\n", err)
|
||||
return errors.Errorf("unable to parse data as json: %v", err)
|
||||
}
|
||||
api.SetJSONValue(entityData, dataMap, "data")
|
||||
api.SetJSONValue(entityData, dataMap, "schema")
|
||||
change = true
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ func (self *updateConfigTypeAction) run() error {
|
||||
return errors.New("no change specified. must specify at least one attribute to change")
|
||||
}
|
||||
|
||||
_, err = patchEntityOfType(fmt.Sprintf("configs/%v", id), entityData.String(), &self.Options)
|
||||
_, err = patchEntityOfType(fmt.Sprintf("config-types/%v", id), entityData.String(), &self.Options)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user