Timestamp Microservice:Wrong answer but passed the Test!

Timestamp Microservice:Wrong answer but passed the Test!
0.0 0

#1

**Hi,
I know my code is not correct, but it passes the test!
**

app.get('/api/timestamp/:date_string',function(req, res){
  var date = req.params.date_string;
  if(!date){
    date = new Date();
    res.json({"unix": date.getTime(), "utc" : date.toUTCString()});
  }else{
    res.json({"unix": date.getTime(), "utc" : date.toUTCString()});
  }
});

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/apis-and-microservices/apis-and-microservices-projects/timestamp-microservice