我试图在单个字段中更新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: []
}
};发布于 2017-12-16 19:52:13
https://stackoverflow.com/questions/47806481
复制相似问题