Changed searchRequest helper
This commit is contained in:
@@ -5,8 +5,11 @@ const Op = sequelize.Op;
|
|||||||
|
|
||||||
const getSearchRequest = async searchRequestId => {
|
const getSearchRequest = async searchRequestId => {
|
||||||
try {
|
try {
|
||||||
|
console.log("test");
|
||||||
return await db.SearchRequest.findByPk(searchRequestId);
|
return await db.SearchRequest.findByPk(searchRequestId);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log("searchrequest.js",error);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -22,7 +25,16 @@ const findSearchRequestsForRealEstate = async realEstate => {
|
|||||||
adType,
|
adType,
|
||||||
realEstateType,
|
realEstateType,
|
||||||
locationLat,
|
locationLat,
|
||||||
locationLong
|
locationLong,
|
||||||
|
//
|
||||||
|
accessRoadType,
|
||||||
|
balcony,
|
||||||
|
newBuilding,
|
||||||
|
elevator,
|
||||||
|
gardenSize,
|
||||||
|
numberOfRooms,
|
||||||
|
numberOfFloors,
|
||||||
|
floor
|
||||||
} = realEstate;
|
} = realEstate;
|
||||||
|
|
||||||
if (!locationLat || !locationLong) {
|
if (!locationLat || !locationLong) {
|
||||||
|
|||||||
Reference in New Issue
Block a user