fix: return duration in Number format
This commit is contained in:
parent
e4bf128b29
commit
3334c14beb
2
index.js
2
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))) {
|
||||
|
Loading…
Reference in New Issue
Block a user