refactor(editor): Stricter linting for promises and async functions (no-changelog) (#4642)

This commit is contained in:
Michael Kret
2023-05-10 18:10:03 +03:00
committed by GitHub
parent 1b1dc0e655
commit ed3bc154b0
114 changed files with 351 additions and 344 deletions

View File

@@ -362,7 +362,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
// Returns a workflow from a given URL
async getWorkflowFromUrl(url: string): Promise<IWorkflowDb> {
const rootStore = useRootStore();
return await makeRestApiRequest(rootStore.getRestApiContext, 'GET', '/workflows/from-url', {
return makeRestApiRequest(rootStore.getRestApiContext, 'GET', '/workflows/from-url', {
url,
});
},
@@ -1062,7 +1062,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
};
}
const rootStore = useRootStore();
return await makeRestApiRequest(
return makeRestApiRequest(
rootStore.getRestApiContext,
'POST',
`/executions/${id}/retry`,
@@ -1073,7 +1073,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
// Deletes executions
async deleteExecutions(sendData: IExecutionDeleteFilter): Promise<void> {
const rootStore = useRootStore();
return await makeRestApiRequest(
return makeRestApiRequest(
rootStore.getRestApiContext,
'POST',
'/executions/delete',
@@ -1109,7 +1109,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
};
}
const rootStore = useRootStore();
return await makeRestApiRequest(
return makeRestApiRequest(
rootStore.getRestApiContext,
'GET',
'/executions-current',
@@ -1155,7 +1155,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
async runWorkflow(startRunData: IStartRunData): Promise<IExecutionPushResponse> {
const rootStore = useRootStore();
return await makeRestApiRequest(
return makeRestApiRequest(
rootStore.getRestApiContext,
'POST',
'/workflows/run',
@@ -1165,7 +1165,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
async removeTestWebhook(workflowId: string): Promise<boolean> {
const rootStore = useRootStore();
return await makeRestApiRequest(
return makeRestApiRequest(
rootStore.getRestApiContext,
'DELETE',
`/test-webhook/${workflowId}`,
@@ -1174,7 +1174,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
async stopCurrentExecution(executionId: string): Promise<IExecutionsStopData> {
const rootStore = useRootStore();
return await makeRestApiRequest(
return makeRestApiRequest(
rootStore.getRestApiContext,
'POST',
`/executions-current/${executionId}/stop`,
@@ -1206,7 +1206,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
async fetchExecutionDataById(executionId: string): Promise<IExecutionResponse | null> {
const rootStore = useRootStore();
return await getExecutionData(rootStore.getRestApiContext, executionId);
return getExecutionData(rootStore.getRestApiContext, executionId);
},
deleteExecution(execution: IExecutionsSummary): void {