When I use the PUT method, I encounter this issue:
const createFaceList = (req: Request<{faceListId : string}>, res: Response, next: NextFunction) => {
console.log(req.body.name);
console.log("faceListID = " + req.params.faceListId);
addFacelist(req.params.faceListId, req.body)
.then( result => {
return res.status(200).json({result})
})
.catch(err => {
logging.error(NAMESPACE, err.messagem, err);
return res.status(err.statusCode).json({
statusCode: err.statusCode,
message: err.message
})
})
}
My console output displays undefined values:
undefined
faceListId = undefined
Could someone provide insights on how to resolve this issue? Thank you.