"use strict";
const {
  findRealEstatesForSearchRequest
} = require("../helpers/db/searchRequestMatch");

const getRealEstates = async (req, res) => {
  const searchRequestId = req.params["searchRequestId"] || "";
  const realEstates = await findRealEstatesForSearchRequest(searchRequestId);

  const title = "Nekretnine koje odgovaraju Vašim uslovima pretrage";
  res.render("realEstates", { realEstates, title });
};

module.exports = {
  getRealEstates
};
