diff --git a/packages/server/src/api/controllers/query.js b/packages/server/src/api/controllers/query.js index d4dd693ca7..1aebfefa07 100644 --- a/packages/server/src/api/controllers/query.js +++ b/packages/server/src/api/controllers/query.js @@ -38,8 +38,10 @@ function enrichQueryFields(fields, parameters) { enrichedQuery[key] = template(parameters) } - if (fields.json || fields.customData) { - enrichedQuery.json = JSON.parse(fields.json || fields.customData) + if (enrichedQuery.json || enrichedQuery.customData) { + enrichedQuery.json = JSON.parse( + enrichedQuery.json || enrichedQuery.customData + ) delete enrichedQuery.customData } diff --git a/packages/server/src/integrations/mongodb.js b/packages/server/src/integrations/mongodb.js index 51af4573aa..b0ccb2d78a 100644 --- a/packages/server/src/integrations/mongodb.js +++ b/packages/server/src/integrations/mongodb.js @@ -6,7 +6,7 @@ const SCHEMA = { connectionString: { type: FIELD_TYPES.STRING, required: true, - default: "localhost", + default: "mongodb://localhost:27017", }, db: { type: FIELD_TYPES.STRING,