feat: Add find triggers by key method to App model

This commit is contained in:
Faruk AYDIN
2024-03-01 15:02:56 +01:00
parent e944333e5f
commit a32bf5539e

View File

@@ -43,7 +43,14 @@ class App {
const rawAppData = await getApp(key, stripFuncs);
const appData = appInfoConverter(rawAppData);
return appData.auth;
return appData?.auth || {};
}
static async findTriggersByKey(key, stripFuncs = false) {
const rawAppData = await getApp(key, stripFuncs);
const appData = appInfoConverter(rawAppData);
return appData?.triggers || [];
}
static async checkAppAndAction(appKey, actionKey) {