diff --git a/app/controllers/publishRealEstate.js b/app/controllers/publishRealEstate.js index 308d819..0dde499 100644 --- a/app/controllers/publishRealEstate.js +++ b/app/controllers/publishRealEstate.js @@ -234,6 +234,9 @@ const postPublishInputs = async (req, res) => { const streetName = req.body.streetName || ""; const longDescription = req.body.longDescription || ""; + const locationLat = req.body.lat || null; + const locationLong = req.body.lng || null; + realEstate.balcony = balcony; realEstate.elevator = elevator; realEstate.newBuilding = newBuilding; @@ -278,6 +281,9 @@ const postPublishInputs = async (req, res) => { realEstate.longDescription = longDescription; + realEstate.locationLat = locationLat; + realEstate.locationLong = locationLong; + await realEstate.save(); res.redirect(nextStepUrl); diff --git a/app/views/publishLocation.ejs b/app/views/publishLocation.ejs new file mode 100644 index 0000000..d2dfd01 --- /dev/null +++ b/app/views/publishLocation.ejs @@ -0,0 +1,192 @@ +