Skip to content

Commit

Permalink
Fix action dispatching that was using ActionType instead of InputType…
Browse files Browse the repository at this point in the history
… as before (#973)
  • Loading branch information
aleksmaus authored Aug 24, 2022
1 parent d56e3f5 commit 9bba975
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (h *AppAction) Handle(ctx context.Context, a fleetapi.Action, acker acker.A
h.log.Debugf("handlerAppAction: action '%v' started with timeout: %v", action.ActionType, timeout)
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
res, err = h.coord.PerformAction(ctx, unit, action.ActionType, params)
res, err = h.coord.PerformAction(ctx, unit, action.InputType, params)
}
end := time.Now().UTC()

Expand Down Expand Up @@ -111,11 +111,12 @@ var (
)

// appendActionResponse appends the action response property with all the action response values excluding the ones specified in excludeActionResponseFields
// "action_response": {
// "endpoint": {
// "acked": true
// }
// }
//
// "action_response": {
// "endpoint": {
// "acked": true
// }
// }
func appendActionResponse(action *fleetapi.ActionApp, inputType string, res map[string]interface{}) {
if len(res) == 0 {
return
Expand Down

0 comments on commit 9bba975

Please sign in to comment.