Add crawler for prostor page #59

Merged
bilal.catic merged 6 commits from add-crawler-for-prostor-page into master 2019-10-25 12:21:25 +02:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 5098b08b3f - Show all commits

View File

@@ -70,6 +70,9 @@ const AD_TYPE = {
};
const AD_CATEGORY = {
ALL: {
id: "ALL"
},
FLAT: {
id: "FLAT",
title: "Stan",

View File

@@ -5,9 +5,10 @@ const { AD_CATEGORY } = require("../common/enums");
const getRealEstateTypes = (req, res) => {
const title = "Koju nekretninu tražite?";
const realEstateTypes = Object.keys(AD_CATEGORY).map(
category => AD_CATEGORY[category]
);
const realEstateTypes = Object.keys(AD_CATEGORY)
.map(category => AD_CATEGORY[category])
.filter(category => category.title);
res.render("realEstateType", { realEstateTypes, title });
};