📅  最后修改于: 2022-03-11 15:03:52.447000             🧑  作者: Mango
const {name , id} = req.body
Category.update(
{_id: id},
{$push: {items: {"name": name}}},{new: true, upsert: true }).exec();
res.sendStatus(200)