Added check up email that everything works.

This commit is contained in:
Naida Vatric
2020-01-23 15:48:48 +01:00
parent 259799144e
commit b2c102bc1a
5 changed files with 84 additions and 5 deletions

View File

@@ -40,6 +40,16 @@ const findNotNotifiedMatches = async () => {
return matchingRecords;
};
const findAllRequestsForCheckUp = async () => {
const query = {
subscribed: true
};
const allRequestsForCheckUp = await db.SearchRequest.findAll({
where: query
});
return allRequestsForCheckUp;
};
const addMatches = async matchingRecords => {
return await db.SearchRequestMatch.bulkCreate(matchingRecords, {
@@ -50,5 +60,6 @@ const addMatches = async matchingRecords => {
module.exports = {
findRealEstatesForSearchRequest,
addMatches,
findNotNotifiedMatches
findNotNotifiedMatches,
findAllRequestsForCheckUp
};