Renamed variables to describe purpose.
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user