Add end to autohouse export.
This commit is contained in:
@@ -39,7 +39,7 @@ exports.default = async (req, res) => {
|
|||||||
const { bodyshops } = await client.request(queries.GET_AUTOHOUSE_SHOPS);
|
const { bodyshops } = await client.request(queries.GET_AUTOHOUSE_SHOPS);
|
||||||
|
|
||||||
const specificShopIds = req.body.bodyshopIds; // ['uuid]
|
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 allxmlsToUpload = [];
|
||||||
const allErrors = [];
|
const allErrors = [];
|
||||||
try {
|
try {
|
||||||
@@ -58,6 +58,7 @@ exports.default = async (req, res) => {
|
|||||||
start: start
|
start: start
|
||||||
? moment(start).startOf("day")
|
? moment(start).startOf("day")
|
||||||
: moment().subtract(3, "days").startOf("day"),
|
: moment().subtract(3, "days").startOf("day"),
|
||||||
|
...(end && { end: moment(end).startOf("day") }),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user