2019-09-30 13:24:07 +02:00
|
|
|
"use strict";
|
|
|
|
|
const {
|
|
|
|
|
findRealEstatesForSearchRequest
|
|
|
|
|
} = require("../helpers/db/searchRequestMatch");
|
2020-01-10 22:52:50 +01:00
|
|
|
const { AD_STATUS } = require("../common/enums");
|
2019-07-12 16:13:03 +02:00
|
|
|
|
2019-09-05 11:14:54 +02:00
|
|
|
const getRealEstates = async (req, res) => {
|
2019-09-30 13:24:07 +02:00
|
|
|
const searchRequestId = req.params["searchRequestId"] || "";
|
|
|
|
|
const realEstates = await findRealEstatesForSearchRequest(searchRequestId);
|
2019-07-12 18:00:02 +02:00
|
|
|
|
2019-09-30 13:24:07 +02:00
|
|
|
const title = "Nekretnine koje odgovaraju Vašim uslovima pretrage";
|
2020-01-10 22:52:50 +01:00
|
|
|
res.render("realEstates", { realEstates, title, AD_STATUS });
|
2019-09-05 11:14:54 +02:00
|
|
|
};
|
2019-07-12 18:00:02 +02:00
|
|
|
|
2019-09-05 11:14:54 +02:00
|
|
|
module.exports = {
|
|
|
|
|
getRealEstates
|
|
|
|
|
};
|