Skip to content

Code style comments #50

Description

@msachi
  • Please use a linter or manually indent your code. It's hard to read in places and it will cause you bugs in the future
  • For example here you have some broken / unfinished code which would be easier to spot with clear indentation:
const compare = (err, hashedPassUserInput, hashedPassInDB, cb) => {
  if( err )
   cb( err )

   else {
     if( hashedPassUserInput == hashedPassInDB )
   }
}
  • There's code duplication in database and database_test folders, I think it would be better to only have separate sql files and reuse the rest
  • Work on variable naming, i.e. consistently snake-cased (checkCookie, instead of checkcookie - this is another source of many bugs), and also avoid trivial variable names like var functions = ... :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions