2019-09-05 11:14:54 +02:00
|
|
|
const db = require("../models/index");
|
2019-04-27 07:08:36 +02:00
|
|
|
|
2019-09-05 11:14:54 +02:00
|
|
|
const currentRERequest = async req => {
|
|
|
|
|
const uniqueId = req.params["request_id"];
|
|
|
|
|
if (!uniqueId) return null;
|
2019-04-27 07:08:36 +02:00
|
|
|
|
2019-09-10 05:46:52 +02:00
|
|
|
return await db.RealEstateRequest.findOne({ where: { uniqueId } });
|
2019-05-16 19:58:48 +02:00
|
|
|
};
|
2019-04-27 07:08:36 +02:00
|
|
|
module.exports = {
|
2019-09-05 11:14:54 +02:00
|
|
|
currentRERequest
|
2019-05-16 19:58:48 +02:00
|
|
|
};
|