add ALL option to crawler cat, exclude from real estate types list
This commit is contained in:
@@ -70,6 +70,9 @@ const AD_TYPE = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const AD_CATEGORY = {
|
const AD_CATEGORY = {
|
||||||
|
ALL: {
|
||||||
|
id: "ALL"
|
||||||
|
},
|
||||||
FLAT: {
|
FLAT: {
|
||||||
id: "FLAT",
|
id: "FLAT",
|
||||||
title: "Stan",
|
title: "Stan",
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ const { AD_CATEGORY } = require("../common/enums");
|
|||||||
|
|
||||||
const getRealEstateTypes = (req, res) => {
|
const getRealEstateTypes = (req, res) => {
|
||||||
const title = "Koju nekretninu tražite?";
|
const title = "Koju nekretninu tražite?";
|
||||||
const realEstateTypes = Object.keys(AD_CATEGORY).map(
|
const realEstateTypes = Object.keys(AD_CATEGORY)
|
||||||
category => AD_CATEGORY[category]
|
.map(category => AD_CATEGORY[category])
|
||||||
);
|
.filter(category => category.title);
|
||||||
|
|
||||||
res.render("realEstateType", { realEstateTypes, title });
|
res.render("realEstateType", { realEstateTypes, title });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user