There are a few bad practices in the backend code, and a few changes that have to be made inside the password recovery routes. Here are the main problems that should be fixed in this issue:
[ ] No string should be hard coded in the backend. We should have common dictionaries with the strings, and they should be imported where they are being used.
[ ] We need a new structure to store the different types we are creating. Currently, there is a common_types.go, but this is not organized and there are other types being created inside the handlers. They should be in a different structure, and being imported into the files that use them
[ ] Something similar should be done to the functions that have been created, such as GenerateSecureRandomDigitCode (terrible name, I know). These functions should also have a separate file/structure of files to declare them, and then they should be imported where they are being used
[ ] There are a few comments inside the code, so check if they are necessary, and if they are not, take them out
There are a few bad practices in the backend code, and a few changes that have to be made inside the password recovery routes. Here are the main problems that should be fixed in this issue: