Back End Development and APIs Projects - Timestamp Microservice

Tell us what’s happening:

i have passed all the tests on this project but the project is not marked that i have completed it. what should i do?

this is my code(const isInvalid = (date) => date.toUTCString() === “Invalid Date”;

// your first API endpoint…
app.get(“/api/:date”, function (req, res) {
let date = new Date(req.params.date);

if (isInvalid(date)) {
date = new Date(+req.params.date);
}

if (isInvalid(date)) {
res.json({error: “Invalid date”})
return;
}

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

app.get(“/api”, (req, res) => {
res.json({
unix: new Date().getTime(),
utc: new Date().toUTCString()
})
}):wink:

###Your project link(s)

solution: https://3000-freecodecam-boilerplate-k1xis71p13r.ws-us115.gitpod.io

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0

Challenge Information:

Back End Development and APIs Projects - Timestamp Microservice

Do you see the completion modal?

If not, remember to add your link to both the “Solution Link” and “Source Code Link” when you submit.

thank you very much! it worked.