fix: return duration in Number format

This commit is contained in:
Manish 2023-03-29 16:18:16 +11:00
parent e4bf128b29
commit 3334c14beb

View File

@ -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))) {