Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { hooks as perms } from 'feathers-permissions';
import { setUUID } from '@/api/hooks/setUUID';
/**
Hook: before
Service: user
*/
export default {
all: [],
find: [
auth.authenticate(['jwt', 'local']),
perms.checkPermissions({ service: 'user' }),
],
get: [
auth.authenticate(['jwt', 'local']),
perms.checkPermissions({ service: 'user' }),
],
create: [
setUUID(),
local.hashPassword(),
],
update: [
auth.authenticate(['jwt', 'local']),
perms.checkPermissions({ service: 'user' }),
],
patch: [
auth.authenticate(['jwt', 'local']),
perms.checkPermissions({ service: 'user' }),
],
remove: [
auth.authenticate(['jwt', 'local']),
perms.checkPermissions({ service: 'user' }),