WiP Added location input.

This commit is contained in:
Naida Vatric
2020-02-07 14:05:00 +01:00
parent 7777081c99
commit 9e06731c84
4 changed files with 219 additions and 6 deletions

View File

@@ -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);