const { disallow, discard } = require('feathers-hooks-common')

module.exports = function (app) {
  return {
    before: {
      all: [],
      find: [],
      get: [],
      create: [
        disallow('external')
      ],
      update: [
        disallow('external')
      ],
      patch: [
        disallow('external')
      ],
      remove: [
        disallow('external')
      ]
    },

    after: {
      all: [discard('__v')],
      find: [],
      get: [],
      create: [],
      update: [],
      patch: [],
      remove: []
    },

    error: {
      all: [],
      find: [],
      get: [],
      create: [],
      update: [],
      patch: [],
      remove: []
    }
  }
}
