refactor(core): fix for no-uncaught-json-parse warnings

This commit is contained in:
Michael Kret
2022-10-21 21:52:43 +03:00
committed by GitHub
parent ca9eca9ae9
commit 1d57b10942
36 changed files with 150 additions and 93 deletions

View File

@@ -11,7 +11,7 @@
import express from 'express';
import _, { cloneDeep } from 'lodash';
import { BinaryDataManager } from 'n8n-core';
import { IDataObject, IWorkflowBase, LoggerProxy, Workflow } from 'n8n-workflow';
import { IDataObject, IWorkflowBase, LoggerProxy, jsonParse, Workflow } from 'n8n-workflow';
import { FindManyOptions, In, IsNull, LessThanOrEqual, Not, Raw } from 'typeorm';
import {
@@ -111,7 +111,7 @@ async function getExecutionsCount(
executionsController.get(
'/',
ResponseHelper.send(async (req: ExecutionRequest.GetAll): Promise<IExecutionsListResponse> => {
const filter = req.query.filter ? JSON.parse(req.query.filter) : {};
const filter = req.query.filter ? jsonParse<IDataObject>(req.query.filter) : {};
const limit = req.query.limit
? parseInt(req.query.limit, 10)