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 = {
|
||||
ALL: {
|
||||
id: "ALL"
|
||||
},
|
||||
FLAT: {
|
||||
id: "FLAT",
|
||||
title: "Stan",
|
||||
|
||||
@@ -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 });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user