Timestamp-microservice - Question about "empty" parameters

Tell us what’s happening:
The Challenge description describe the following need:

if the date string is empty it should be equivalent to trigger new Date() , i.e. the service uses the current timestamp.

How could an Parameter be empty if I use the :parameter notation?
If I don’t add the Date-String behind /api/timestamp, the route doesn’t match anymore?!

So the only way is to create an additional route only for /api/timestamp, right?!
Your code so far

app.get("/api/timestamp/:date_string", (req, res) => {
  let reqDate = req.params.date_string;
  let respDate;
  reqDate = reqDate.indexOf('-') === -1 ? parseInt(reqDate) : (!reqDate ? new Date() : reqDate ) ;
  respDate = new Date(parseInt(reqDate));

  res.json({ 
          "unix": respDate.getTime(),
          "utc": respDate.toUTCString()
        });
});

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36.

Challenge: timestamp-microservice

Link to the challenge:

Ok, for now I only create an new API-Route to fix the previous question.

But I have an new Issue: Might be that the Test-Script has a bug?

See this image… here I got the (in my opinion) perfectly fine result for the challenge, but it doesn’t pass.
The Topic

It should return the expected error message for an invalid date
doesn’t pass.

Did I miss something? I don’t see, why this test don’t pass.

Yep, found it. It’s a Bug in the Challenge.

In the Output-Text of the “forked” Challenge, Topic 5 describe the wrong object.
You can see it in the Example-Result Project:

I’ll create a PR on GitHub to fix this.