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?