use single ENUMS; change old realEstateType enums

This commit is contained in:
Bilal Catic
2019-09-27 18:20:16 +02:00
parent f31355dd84
commit d8d801d314
3 changed files with 35 additions and 1 deletions

View File

@@ -1,10 +1,13 @@
const { currentSearchRequest } = require("../helpers/url");
const { createSearchRequest } = require("../helpers/db/searchRequest");
const { realEstateTypes, getRealEstateTypeEnum } = require("../helpers/enums");
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]
);
res.render("realEstateType", { realEstateTypes, title });
};