Timestamp-microservice failed passing test case

Tell us what’s happening:
I was trying to solve this problem and submitted many times but still, it was not accepting my answer. If anyone please tell me what’s wrong in my code would be very helpful.

Your code so far
```
app.get("/api/timestamp", function (req, res) {
res.json({
“unix” :Date.now(),
“utc”: new Date().toUTCString()
});
});

app.get("/api/timestamp/:date_string", function (req, res) {
const date = new Date(req.params.date_string)

if (Object.prototype.toString.call(date) === “[object Date]”) {
// it is a date
if (isNaN(date.getTime())) { // d.valueOf() could also work
// date is not valid
res.json({
“error” :“Invalid Date”
})
} else {
res.json({
“unix” :date.getTime(),
“utc”: date.toUTCString()
});
}
} else {
res.json({
“error” :“Invalid Date”
})
}

});```

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: undefined

Link to the challenge: