Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x 1x 146x 146x 146x 146x | const auth = require('@feathersjs/authentication-local').hooks; module.exports = hashPassword; async function hashPassword (app, password, field) { Iif (!field) throw new Error('Field is missing'); const context = { type: 'before', data: { [field]: password }, params: { provider: null }, app }; const newContext = await auth.hashPassword(field)(context); return newContext.data[field]; } |