@jcbuisson/express-x 1.6.4 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcbuisson/express-x",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
@@ -6,7 +6,8 @@ import { getConnectionDataItem } from './context.mjs'
6
6
 
7
7
  // hash password of user record
8
8
  export const hashPassword = (passwordField) => async (context) => {
9
- context.args[0][passwordField] = await bcrypt.hash(context.args[0][passwordField], 5)
9
+ // context.result is a user
10
+ context.result[passwordField] = await bcrypt.hash(context.result[passwordField], 5)
10
11
  return context
11
12
  }
12
13