From 17a6250b840eeeff3d8b87ecf53e424413b28db6 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Tue, 10 Sep 2019 10:56:16 +0200 Subject: [PATCH] change column name for database query --- app/helpers/db/dbHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/db/dbHelper.js b/app/helpers/db/dbHelper.js index 0d56f48..d5288be 100644 --- a/app/helpers/db/dbHelper.js +++ b/app/helpers/db/dbHelper.js @@ -90,7 +90,7 @@ const getMarketAlertById = async id => { */ const findPointInsideBoundingBox = async (latLng, email, uniqueId) => { return await db.sequelize.query( - `SELECT * FROM "RealEstateRequests" WHERE email = '${email}' AND "uniqueId" = '${uniqueId}' AND subscribed = true AND ST_Contains("RealEstateRequests".boundingBox, ST_GEOMFROMTEXT('POINT (${ + `SELECT * FROM "RealEstateRequests" WHERE email = '${email}' AND "uniqueId" = '${uniqueId}' AND subscribed = true AND ST_Contains("RealEstateRequests"."boundingBox", ST_GEOMFROMTEXT('POINT (${ latLng[0] } ${latLng[1]})'))` );