Disable order for the current day
This commit is contained in:
parent
372c788396
commit
085ae08b74
2 changed files with 2 additions and 0 deletions
|
@ -4,6 +4,7 @@ let models = require("../models");
|
||||||
|
|
||||||
router.get("/", async (req, res) => {
|
router.get("/", async (req, res) => {
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
|
now.setDate(now.getDate()+1);
|
||||||
let [firstDate, lastDate] = [await models.Data.findByPk("firstDate"),
|
let [firstDate, lastDate] = [await models.Data.findByPk("firstDate"),
|
||||||
await models.Data.findByPk("lastDate")];
|
await models.Data.findByPk("lastDate")];
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ module.exports = async (req, res, args, dateCheck = true) => {
|
||||||
let [firstDate, lastDate] = [await models.Data.findByPk("firstDate"),
|
let [firstDate, lastDate] = [await models.Data.findByPk("firstDate"),
|
||||||
await models.Data.findByPk("lastDate")];
|
await models.Data.findByPk("lastDate")];
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
|
now.setDate(now.getDate()+1);
|
||||||
now.setUTCHours(0, 0, 0, 0);
|
now.setUTCHours(0, 0, 0, 0);
|
||||||
|
|
||||||
if (firstDate && firstDate.value && lastDate && lastDate.value) {
|
if (firstDate && firstDate.value && lastDate && lastDate.value) {
|
||||||
|
|
Reference in a new issue