facn6 / week7-Ayah-Kira

0 stars 2 forks source link

Try to make your code more modular #28

Open bobbysebolao opened 5 years ago

bobbysebolao commented 5 years ago

At the moment, you are hashing users' passwords inside the same function that posts them to your database.

I would recommend that you separate your bcrypt logic from your SQL query logic, since they handle different things. Modularising functions (saving them in different files) will help you to manage your codebase in larger projects, and to enforce separation of concerns (see the first paragraph here).