我正在尝试在单个字段中更新 mongodb 文档,我怀疑我想使用哪种方法来使用补丁或使用羽毛框架进行更新,请举例说明我们如何做到这一点。
const { authenticate } = require('feathers-authentication').hooks;
module.exports = {
before: {
all: [ authenticate('jwt') ],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
after: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
error: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
}
};