change bounding box column name from snake case to camel case

This commit is contained in:
Bilal Catic
2019-09-10 05:45:58 +02:00
parent d529ef64ae
commit 65c9ece073
3 changed files with 23 additions and 3 deletions

View File

@@ -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".bounding_box, 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]})'))`
);