From c125cd8ca2792af20c934d2926ba4404105e4c1f Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 30 Mar 2022 14:45:09 -0700 Subject: [PATCH] Add end to autohouse export. --- server/data/autohouse.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/data/autohouse.js b/server/data/autohouse.js index 5688f7bc7..417e4caaa 100644 --- a/server/data/autohouse.js +++ b/server/data/autohouse.js @@ -39,7 +39,7 @@ exports.default = async (req, res) => { const { bodyshops } = await client.request(queries.GET_AUTOHOUSE_SHOPS); const specificShopIds = req.body.bodyshopIds; // ['uuid] - const start = req.body.start; //YYYY-MM-DD + const { start, end } = req.body; //YYYY-MM-DD const allxmlsToUpload = []; const allErrors = []; try { @@ -58,6 +58,7 @@ exports.default = async (req, res) => { start: start ? moment(start).startOf("day") : moment().subtract(3, "days").startOf("day"), + ...(end && { end: moment(end).startOf("day") }), } );