feat: validate action input in updateStep

This commit is contained in:
Ali BARIN
2023-03-12 11:17:41 +00:00
parent dc1002659b
commit 4c4bd267d4
2 changed files with 15 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import { IJSONObject } from '@automatisch/types';
import App from '../../models/app';
import Step from '../../models/step';
import Context from '../../types/express/context';
@@ -42,6 +43,10 @@ const updateStep = async (
}
}
if (step.isAction) {
await App.checkAppAndAction(input.appKey, input.key);
}
step = await Step.query()
.patchAndFetchById(input.id, {
key: input.key,