Skip to content

Commit 49b0b1d

Browse files
Automations. App Logic trigger not work without req. body (#244)
1 parent 6e08a1d commit 49b0b1d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/automations/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export default class Automations {
3737
}
3838

3939
return this.app.request.post({
40-
url : `${this.app.urls.automationFlowTrigger()}/activate-by-name`,
40+
url : `${this.app.urls.automationFlowTrigger()}/activate-by-name`,
4141
query: { flowName, triggerName },
42-
data,
42+
data : data || {},
4343
})
4444
}
4545
}

test/unit/specs/automations/basic.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('<Automations> Basic', function() {
7878
expect(req1).to.deep.include({
7979
method: 'POST',
8080
path : `${APP_PATH}/automation/flow/trigger/activate-by-name?flowName=${FLOW_NAME}&triggerName=${TRIGGER_NAME}`,
81+
body : {},
8182
})
8283

8384
expect(req2).to.deep.include({

0 commit comments

Comments
 (0)