From 4b941e7a9f8fd888cc29814961027007d253c04b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 15 Jan 2021 13:42:14 +0000 Subject: [PATCH] mongo config --- packages/server/src/api/controllers/query.js | 6 ++++-- packages/server/src/integrations/mongodb.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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,