Merge pull request #333 from automatisch/fix/connection-association

fix: Fetch connection while getting trigger for step
This commit is contained in:
Ömer Faruk Aydın
2022-05-13 12:53:23 +02:00
committed by GitHub

View File

@@ -84,14 +84,16 @@ class Step extends Base {
async getTrigger() {
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 AppClass = (await import(`../apps/${appKey}`)).default;
const appInstance = new AppClass(
appData,
connection?.formattedData,
parameters,
parameters
);
const command = appInstance.triggers[key];