fix: only show apps with actions in action step
This commit is contained in:
@@ -4,6 +4,7 @@ import { IApp } from '@automatisch/types';
|
||||
type Params = {
|
||||
name: string;
|
||||
onlyWithTriggers: boolean;
|
||||
onlyWithActions: boolean;
|
||||
};
|
||||
|
||||
const getApps = async (_parent: unknown, params: Params) => {
|
||||
@@ -13,6 +14,10 @@ const getApps = async (_parent: unknown, params: Params) => {
|
||||
return apps.filter((app: IApp) => app.triggers?.length);
|
||||
}
|
||||
|
||||
if (params.onlyWithActions) {
|
||||
return apps.filter((app: IApp) => app.actions?.length);
|
||||
}
|
||||
|
||||
return apps;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user