From 3334c14beb273a7e0252040127a27b756798f094 Mon Sep 17 00:00:00 2001 From: Manish Date: Wed, 29 Mar 2023 16:18:16 +1100 Subject: [PATCH] fix: return duration in Number format --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 382dcf1..ba0602a 100644 --- a/index.js +++ b/index.js @@ -79,7 +79,7 @@ const getDateInTicks = (date) => { app.post("/api/users/:_id/exercises", (req, res) => { const _id = req.params._id; const description = req.body.description; - const duration = req.body.duration; + const duration = Number(req.body.duration); let date = getDateInTicks(req.body.date); if (Number.isNaN(Number(date))) {