From 521480010080d61586e05366e23c6ba3633cb2fa Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 1 Nov 2022 11:51:14 -0700 Subject: parse end time --- routes/payments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/payments.js b/routes/payments.js index 4c71cde0..678b646c 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -112,7 +112,7 @@ app.get("/payments", auth, async (req, res) => { }; if (start) where.createdAt[Op.gte] = new Date(parseInt(start)); - if (end) where.createdAt[Op.lte] = new Date(end); + if (end) where.createdAt[Op.lte] = new Date(parseInt(end)); if (!req.user.account_id) return res.send([]); -- cgit v1.2.3