export async function post(req, res, next) {
console.log(req.body) // вот для этого необходим body-parser
res.writeHead(200, {
'Content-Type': 'application/json'
});
}
router.post('/new/', (req,res,next) => {
const data = {id: req.body.id, name: req.body.name};
req.session.cart.newItem = data;
res.status(200).send(true); // к примеру
})
isKType ? selected.push({type: 'k'}) : false
if (isAllTypes || array.contains('akt')) selected.push({type: 'akt'})
if (isDTypes) selected.push({type: 'd'})
if (isKType) selected.push({type: 'k'})