1 Fragment.findOneAndUpdate({_id:id}, {$set: datas}, {upsert:true, 'new':true}).populate('ads').exec(function(err, item) {2 es.render('fragments/edit', {item:item, current: req.user, message:'保存成功'});3 res.json(item);4 });
本文共 287 字,大约阅读时间需要 1 分钟。
1 Fragment.findOneAndUpdate({_id:id}, {$set: datas}, {upsert:true, 'new':true}).populate('ads').exec(function(err, item) {2 es.render('fragments/edit', {item:item, current: req.user, message:'保存成功'});3 res.json(item);4 });
转载于:https://www.cnblogs.com/suoking/p/5219733.html