generated from HAlGhanim/Express-Template-FS
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
When performing an update for the logged in user, we have the following issues:
- Password is not being hashed and is stored raw in the database
- Image cannot be updated and is being stored
When the user sends the password, you can either hash the password within an if condition if it is in the req.body or not accept it at all by ensuring that it never gets to the update method.
Additionally, we can add multer as a route middleware and check if user sends an image for an update, then add a conditional to check for req.file when updating the req.body.image
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request