
Originally Posted by
joel de paula
there are just some things to refactor there, like routes, use of an orm, and async / await to make the code more cute.
About the routes I mentioned the refactoring because a file is having a lot of responsibility, I would think it better to separate what each route does in a different file and leave it just like that.
"app.get ('/ account /: id', login.authorizedAuth, Account.searchUserId);" // Search
I thought the use of express-json was cool, I could have used the normal one even more I thought it was cool, because it would avoid importing more library with the normal "jsonwebtoken" would use the verify method to check if the token is true.
Besides, I thought the idea was very good ... I'm creating a dashboard and maybe I would use some validations that you used there.