"Get Query Parameter Input from the Client"

I cannot pass this challenge.

My code is

app.route('/name')
   .get((req, res) => {
     let fname = req.query.firstname;
     let lname = req.query.lastname;
     res.json({name: `${fname} ${lname}`})
   })
   .post((req, res) => {
     let fname = req.query.firstname;
     let lname = req.query.lastname;
     res.json({name: `${fname} ${lname}`})
   })

The effect seems good.

But it doesn’t pass.

What can it be happened this time?

The query parameters are first and last.

Thanks, maybe I should take some rest.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.