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