WiP Changed welcome and input form for ad type
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { getSearchRequest } = require("./db/searchRequest");
|
||||
const { getRealEstateById } = require("./db/realEstate");
|
||||
|
||||
const currentSearchRequest = async req => {
|
||||
const searchRequestId =
|
||||
@@ -7,6 +8,14 @@ const currentSearchRequest = async req => {
|
||||
|
||||
return await getSearchRequest(searchRequestId);
|
||||
};
|
||||
module.exports = {
|
||||
currentSearchRequest
|
||||
|
||||
const currentRealEstate = async req => {
|
||||
const realEstateId = req && req.params ? req.params["realEstateId"] : null;
|
||||
if (!realEstateId) return null;
|
||||
|
||||
return await getRealEstateById(realEstateId);
|
||||
};
|
||||
module.exports = {
|
||||
currentSearchRequest,
|
||||
currentRealEstate
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user