DemocracyOS/democracyos

View on GitHub
lib/api/signin/index.js

Summary

Maintainability
A
1 hr
Test Coverage

Function signin has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function signin (req, res, next) {
  var email = normalizeEmail(req.body.email)
  auth(email, req.body.password, function (err, user, info) {
    if (err) return res.status(200).json({ error: t(err.message) })

Severity: Minor
Found in lib/api/signin/index.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

        return next()
    Severity: Major
    Found in lib/api/signin/index.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status