Javascript 我们是否可以阻止钩子将其保存到feather js中的集合中?

Javascript 我们是否可以阻止钩子将其保存到feather js中的集合中?,javascript,feathersjs,Javascript,Feathersjs,我想在羽毛挂钩前创建一个过滤器。我想检查数据是否包含此参数,然后不要将此数据保存到集合中。羽毛有可能吗 这可以通过在挂钩之前设置。有关更多详情,请参阅: app.service('users').hooks({ before: { get: [ context => { // Never call the actual users service // just use the authenticated user c

我想在羽毛挂钩前创建一个过滤器。我想检查数据是否包含此参数,然后不要将此数据保存到集合中。羽毛有可能吗

这可以通过在挂钩之前设置
。有关更多详情,请参阅:

app.service('users').hooks({
  before: {
    get: [
      context => {
        // Never call the actual users service
        // just use the authenticated user
        context.result = context.params.user;

        return context;
      }
    ]
  }
});