实践 - 关于通过API更新时避免lodash.merge的使用
API的body部分(Patch方式)
{
"statusOfOrder": "processing",
"pharmacist": "5be904255b450d6f20d74fc3"
}
管理端更新函数部分
const _ = require('lodash');
// order = _.merge(order, req.body); // 不应该使用merge。1.因为有漏洞(例...
原创
2019-01-10 12:43:29 ·
810 阅读 ·
0 评论