feat: Implement get trigger substeps API endpoint

This commit is contained in:
Faruk AYDIN
2024-03-01 15:58:42 +01:00
parent 73bd90c555
commit cea9ed056b
6 changed files with 96 additions and 1 deletions

View File

@@ -53,6 +53,17 @@ class App {
return appData?.triggers || [];
}
static async findTriggerSubsteps(appKey, triggerKey, stripFuncs = false) {
const rawAppData = await getApp(appKey, stripFuncs);
const appData = appInfoConverter(rawAppData);
const trigger = appData?.triggers?.find(
(trigger) => trigger.key === triggerKey
);
return trigger?.substeps || [];
}
static async checkAppAndAction(appKey, actionKey) {
const app = await this.findOneByKey(appKey);