Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
remove: [ authenticate('jwt') ]
},
after: {
all: [
// Make sure the password field is never sent to the client
// Always must be the last hook
protect('password')
],
find: [],
get: [],
create: [
context => {
accountService(context.app).notifier('resendVerifySignup', context.result)
},
verifyHooks.removeVerification()
],
update: [],
patch: [],
remove: []
},
error: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
}
};
commonHooks.when(
hook => hook.params.provider,
commonHooks.discard('password', '_computed', 'verifyExpires', 'resetExpires', 'verifyChanges')
),
],
find: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
],
get: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
],
create: [
sendVerificationEmail(),
verifyHooks.removeVerification()
],
update: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
],
patch: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
],
remove: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
]
},
error: {
all: [
hooks.remove('password')
],
find: [
common.populate({ schema }),
common.serialize(serializeSchema),
hooks.remove([ '_computed'])
],
get: [
common.populate({ schema }),
common.serialize(serializeSchema),
hooks.remove([ '_computed'])
],
create: [
globalHooks.sendVerificationEmail(),
verifyHooks.removeVerification(),
],
update: [],
patch: [],
remove: []
};