fix: Set '@typescript-eslint/return-await' rule to 'always' for node code (no-changelog) (#8363)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Tomi Turtiainen
2024-01-17 17:08:50 +02:00
committed by GitHub
parent 2eb829a6b4
commit 9a1cc56806
369 changed files with 1041 additions and 928 deletions

View File

@@ -392,15 +392,15 @@ export class Wait extends Webhook {
async webhook(context: IWebhookFunctions) {
const resume = context.getNodeParameter('resume', 0) as string;
if (resume === 'form') return formWebhook(context);
return super.webhook(context);
if (resume === 'form') return await formWebhook(context);
return await super.webhook(context);
}
async execute(context: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const resume = context.getNodeParameter('resume', 0) as string;
if (['webhook', 'form'].includes(resume)) {
return this.configureAndPutToWait(context);
return await this.configureAndPutToWait(context);
}
let waitTill: Date;
@@ -433,14 +433,14 @@ export class Wait extends Webhook {
if (waitValue < 65000) {
// If wait time is shorter than 65 seconds leave execution active because
// we just check the database every 60 seconds.
return new Promise((resolve) => {
return await new Promise((resolve) => {
const timer = setTimeout(() => resolve([context.getInputData()]), waitValue);
context.onExecutionCancellation(() => clearTimeout(timer));
});
}
// If longer than 65 seconds put execution to wait
return this.putToWait(context, waitTill);
return await this.putToWait(context, waitTill);
}
private async configureAndPutToWait(context: IExecuteFunctions) {
@@ -471,7 +471,7 @@ export class Wait extends Webhook {
}
}
return this.putToWait(context, waitTill);
return await this.putToWait(context, waitTill);
}
private async putToWait(context: IExecuteFunctions, waitTill: Date) {