Changed id type to uuid.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const { getSearchRequest } = require("./db/searchRequest");
|
||||
const { getRealEstateById } = require("./db/realEstate");
|
||||
const { getKiviOriginalById } = require("./db/kiviOriginal");
|
||||
|
||||
const currentSearchRequest = async req => {
|
||||
const searchRequestId =
|
||||
@@ -15,7 +16,16 @@ const currentRealEstate = async req => {
|
||||
|
||||
return await getRealEstateById(parseInt(realEstateId));
|
||||
};
|
||||
const currentKiviRealEstate = async req => {
|
||||
const kiviRealEstateId =
|
||||
req && req.params ? req.params["kiviRealEstateId"] : null;
|
||||
if (!kiviRealEstateId) return null;
|
||||
|
||||
return await getKiviOriginalById(kiviRealEstateId);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
currentSearchRequest,
|
||||
currentRealEstate
|
||||
currentRealEstate,
|
||||
currentKiviRealEstate
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user