Webpage not sending data over to Server

Hello. I was working on the Backend Project Timestamp Microservice and I was having trouble sending my input date to my server. I am using Express for my server and Axios for my webpage. Here is the request I am sending to the server through Axios. The only response I get is the default {error: "Invalid Date"} but this comes in for good dates too.

function getResponse() {
  const input = $("#date-input");
    url: "/api/date",
    method: "get",
    params: {
      data : input,
    }, // the reason for the params and data mess is that I was trying
// to try multiple different solutions that worked for others.
    data: input,
  }).then((data) => {

Here is my Express Code that receives it.

app.get("/api/date", (req, res, next) => {
  if (req.params === ""){
    let date = new Date();
    res.send({unix: date.getTime()/1000, "utc": date.getUTCDate()});
  } else if (req.params !== undefined) {
      let date =  new Date(req.body);
      if (Number(date.getTime()) === 'NaN'){
        res.send({unix: date.getTime()/1000, "utc": date.getUTCDate()});
      } else {
        res.send({error: "Invalid Date"})
  } else {
    res.send({ error : "Invalid Date" });

Is their something I missing. Am I just not accessing the right thing. I appreciate all the help. Here is my replit.

Your route is incorrect. The correct route is /api/ followed by a valid date. Your route is have /api/date/ followed by a date.

You have at least one other issue but you will probably figure that out now that you know what the correct route is.

I am still having some trouble understanding all of this. I did what you said and fixed the route but I am not seeing what you saw.

You are using req.params but you have not specified any route parameters in your actual route. Now, all I see is app.get("/api",. I suggest reviewing this Express challenge again that shows how to get route parameter input.

I never really thought about there being a difference between query parameters and route parameters and I thank you for all your insight.