Debugging- noOfRealEstates and staging tag.

This commit is contained in:
Naida Vatric
2020-02-05 21:58:45 +01:00
parent 74def9c059
commit 2d0a00b967
2 changed files with 24 additions and 2 deletions

View File

@@ -35,9 +35,11 @@ const notifyForNewSearchRequest = async searchRequest => {
matchingRealEstates
);
const { email } = searchRequest;
//DEBUGGING
console.log("[DEBUGGING]: Function notifyForNewSearchRequest-", stagingTag);
await sendEmail(
email,
`${stagingTag} Kivi - novi zahtjev za pretragu`,
`${stagingTag} Kivi - novi zahtstagingjev za pretragu`,
emailContent
);
};
@@ -57,6 +59,11 @@ const notifyMatches = async (matches, dailyNotification = false) => {
//New variable allRealEstates are all real estates that exists in db for search req
const allRealEstates = await findRealEstatesForSearchRequest(id);
const noAllRealEstates = allRealEstates.length;
//DEBUGGING
console.log(
"[DEBUGGING] Function notifyMatches-noAllRealEstates:",
noAllRealEstates
);
if (allMatchingRealEstates.length > 0) {
const emailContent = generateNotificationEmail(