Renamed variables to describe purpose.

This commit is contained in:
Naida Vatric
2020-02-23 18:47:27 +01:00
parent 6791a509d0
commit 8435afe9c5
7 changed files with 24 additions and 24 deletions

View File

@@ -2,7 +2,7 @@
const db = require("../../models/index");
const sequelize = require("sequelize");
const Op = sequelize.Op;
const { CHECK_UP_DAYS } = require("../../config/appConfig");
const { NO_CHECK_UP_DAYS } = require("../../config/appConfig");
const findRealEstatesForSearchRequest = async searchRequestId => {
const query = {
@@ -45,9 +45,9 @@ const findNotNotifiedMatches = async () => {
};
const findAllRequestsForCheckUp = async () => {
//First we find IDs of search request that don't need to be emailed for check up - to EXCLUDE
//The ones that received notification for real estate CHECK_UP_DAYS days from now
//The ones that received notification for real estate NO_CHECK_UP_DAYS days from now
const date = new Date();
const checkUpDate = date.getDate() - CHECK_UP_DAYS;
const checkUpDate = date.getDate() - NO_CHECK_UP_DAYS;
date.setDate(checkUpDate);
const dateQuery = {
createdAt: {