feat: validate app and action input in createStep
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import App from '../../models/app';
|
||||
import Context from '../../types/express/context';
|
||||
|
||||
type Params = {
|
||||
@@ -23,6 +24,14 @@ const createStep = async (
|
||||
) => {
|
||||
const { input } = params;
|
||||
|
||||
if (input.appKey && input.key) {
|
||||
await App.checkAppAndAction(input.appKey, input.key);
|
||||
}
|
||||
|
||||
if (input.appKey && !input.key) {
|
||||
await App.findOneByKey(input.appKey);
|
||||
}
|
||||
|
||||
const flow = await context.currentUser
|
||||
.$relatedQuery('flows')
|
||||
.findOne({
|
||||
|
Reference in New Issue
Block a user