Skip to content

Commit

Permalink
Fix payload for config endpoint (#126)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicko Guyer <[email protected]>
  • Loading branch information
nguyer authored Jan 6, 2022
1 parent ee87bb8 commit 745b3cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/stacks/stack_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,12 @@ func (s *StackManager) PrintStackInfo(verbose bool) error {

func (s *StackManager) patchConfigAndRestartFireflyNodes(verbose bool) error {
for _, member := range s.Stack.Members {
configPayload := map[string]interface{}{
"preInit": false,
}
s.Log.Info(fmt.Sprintf("applying configuration changes to %s", member.ID))
configRecordUrl := fmt.Sprintf("http://localhost:%d/admin/api/v1/config/records/admin", member.ExposedFireflyAdminPort)
if err := core.RequestWithRetry("PUT", configRecordUrl, "{\"preInit\": false}", nil); err != nil && err != io.EOF {
if err := core.RequestWithRetry("PUT", configRecordUrl, configPayload, nil); err != nil && err != io.EOF {
return err
}
resetUrl := fmt.Sprintf("http://localhost:%d/admin/api/v1/config/reset", member.ExposedFireflyAdminPort)
Expand Down

0 comments on commit 745b3cd

Please sign in to comment.