Started edit ad option.
This commit is contained in:
@@ -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
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user