use single ENUMS; change old realEstateType enums
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const { currentSearchRequest } = require("../helpers/url");
|
||||
const { getRealEstateTypeEnum } = require("../helpers/enums");
|
||||
const { AD_CATEGORY } = require("../common/enums");
|
||||
|
||||
const getGardenSize = (req, res) => {
|
||||
const title = "Koliko okućnice tražite ?";
|
||||
@@ -28,7 +28,7 @@ const postGardenSize = async (req, res) => {
|
||||
const nextStepPage = req.query.nextStep || "cijena";
|
||||
const nextStepUrl = `/${nextStepPage}/${searchRequest.id}`;
|
||||
|
||||
const realEstateType = getRealEstateTypeEnum(searchRequest.realEstateType);
|
||||
const realEstateType = AD_CATEGORY[searchRequest.realEstateType];
|
||||
if (realEstateType && realEstateType.hasGardenSize) {
|
||||
const gardenSizeMin = req.body.from || 0;
|
||||
const gardenSizeMax = req.body.to || 0;
|
||||
|
||||
Reference in New Issue
Block a user