removed cron job that made rentals active. Now whether or not the rental is active is determined on the fly
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const { ConditionCheck, Rental, User } = require("../models");
|
||||
const { Op } = require("sequelize");
|
||||
const { isActive } = require("../utils/rentalStatus");
|
||||
|
||||
class ConditionCheckService {
|
||||
/**
|
||||
@@ -70,7 +71,7 @@ class ConditionCheckService {
|
||||
canSubmit =
|
||||
now >= timeWindow.start &&
|
||||
now <= timeWindow.end &&
|
||||
rental.status === "active";
|
||||
isActive(rental);
|
||||
break;
|
||||
|
||||
case "rental_end_renter":
|
||||
@@ -80,7 +81,7 @@ class ConditionCheckService {
|
||||
canSubmit =
|
||||
now >= timeWindow.start &&
|
||||
now <= timeWindow.end &&
|
||||
rental.status === "active";
|
||||
isActive(rental);
|
||||
break;
|
||||
|
||||
case "post_rental_owner":
|
||||
|
||||
Reference in New Issue
Block a user