Added formated subject to bulk email

This commit is contained in:
Nedim Uka
2019-07-02 21:49:56 +02:00
parent 7f0b2d299e
commit b79a274f96
8 changed files with 120 additions and 18 deletions

View File

@@ -11,6 +11,20 @@ const allRERequest = async () => {
});
}
/**
* Find all subscribed RealEstateRequests by UUID
*/
const allRERequestByUiid = async (requestArray) => {
const Op = db.Sequelize.Op;
return await db.RealEstateRequest.findAll({
where: {
subscribed: true,
[Op.or]: requestArray
}
});
}
/**
* Find all , or all depending on notified bolean marketalerts, and order them by email
*
@@ -50,5 +64,6 @@ const findPointInsideBoundingBox = async (latLng, email) => {
module.exports = {
allRERequest,
allMarketAlerts,
allRERequestByUiid,
findPointInsideBoundingBox
};