diff --git a/app/controllers/publishRealEstate.js b/app/controllers/publishRealEstate.js
index 7e00e3d..1d7378b 100644
--- a/app/controllers/publishRealEstate.js
+++ b/app/controllers/publishRealEstate.js
@@ -82,6 +82,15 @@ const getPublishInputs = async (req, res) => {
title,
longDescription
} = realEstate;
+
+ const { email } = kiviOriginal;
+ //If email is not empty - has string value, then proces of publishing has been conducted alredy
+ //That means user is editing existing real estate ad not publishing new one
+ let editingRealEstate = false;
+ if (email) {
+ editingRealEstate = true;
+ }
+
const category = AD_CATEGORY[realEstateType] || AD_CATEGORY.FLAT;
// TODO: Maybe this is slow, pay attention to this
@@ -172,7 +181,11 @@ const getPublishInputs = async (req, res) => {
basicInputValues,
additionalInputInputs,
additionalInputValues,
- validate: validate
+ validate: validate,
+ email,
+ locationLat: locationLat || 0,
+ locationLong: locationLong || 0,
+ editingRealEstate
});
};
diff --git a/app/helpers/emailContentGenerator.js b/app/helpers/emailContentGenerator.js
index e522876..2c5a03d 100644
--- a/app/helpers/emailContentGenerator.js
+++ b/app/helpers/emailContentGenerator.js
@@ -231,7 +231,7 @@ const generateNewAdPublishEmail = (