Skip to content

Commit

Permalink
Merge pull request #1129 from CedricFinance/master
Browse files Browse the repository at this point in the history
Fix WorkflowStepCompletedRequest options handling
  • Loading branch information
kanata2 committed Dec 2, 2022
2 parents c99b47b + 3d6bc00 commit 93341d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workflow_step_execute.go
Expand Up @@ -19,10 +19,10 @@ type (
}
)

type WorkflowStepCompletedRequestOption func(opt WorkflowStepCompletedRequest) error
type WorkflowStepCompletedRequestOption func(opt *WorkflowStepCompletedRequest) error

func WorkflowStepCompletedRequestOptionOutput(outputs map[string]string) WorkflowStepCompletedRequestOption {
return func(opt WorkflowStepCompletedRequest) error {
return func(opt *WorkflowStepCompletedRequest) error {
if len(outputs) > 0 {
opt.Outputs = outputs
}
Expand All @@ -33,7 +33,7 @@ func WorkflowStepCompletedRequestOptionOutput(outputs map[string]string) Workflo
// WorkflowStepCompleted indicates step is completed
func (api *Client) WorkflowStepCompleted(workflowStepExecuteID string, options ...WorkflowStepCompletedRequestOption) error {
// More information: https://api.slack.com/methods/workflows.stepCompleted
r := WorkflowStepCompletedRequest{
r := &WorkflowStepCompletedRequest{
WorkflowStepExecuteID: workflowStepExecuteID,
}
for _, option := range options {
Expand Down

0 comments on commit 93341d4

Please sign in to comment.