fix: Fetch connection while getting trigger for step
This commit is contained in:
@@ -84,14 +84,16 @@ class Step extends Base {
|
|||||||
async getTrigger() {
|
async getTrigger() {
|
||||||
if (!this.isTrigger) return null;
|
if (!this.isTrigger) return null;
|
||||||
|
|
||||||
const { appKey, connection, key, parameters = {} } = this;
|
const { appKey, key, parameters = {} } = this;
|
||||||
|
|
||||||
|
const connection = await this.$relatedQuery('connection');
|
||||||
|
|
||||||
const appData = App.findOneByKey(appKey);
|
const appData = App.findOneByKey(appKey);
|
||||||
const AppClass = (await import(`../apps/${appKey}`)).default;
|
const AppClass = (await import(`../apps/${appKey}`)).default;
|
||||||
const appInstance = new AppClass(
|
const appInstance = new AppClass(
|
||||||
appData,
|
appData,
|
||||||
connection?.formattedData,
|
connection?.formattedData,
|
||||||
parameters,
|
parameters
|
||||||
);
|
);
|
||||||
const command = appInstance.triggers[key];
|
const command = appInstance.triggers[key];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user