-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When I click on "Change password", then "Cancel", the password param is sent with an empty value, which gives the error: no such column: password
I suggest changing encryptPassword function to:
const encryptPassword: Before = async (request) => {
const { method } = request
const { [passwordProperty]: newPassword, ...rest } = request.payload || {}
if (method === 'post') {
return {
...request,
payload: {
...rest,
...(newPassword ? { [encryptedPasswordProperty]: await hash(newPassword) } : null)
},
}
}
return request
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels