neotoma/sync-server

View on GitHub
app/routers/auths.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function reqPassportDocument has 104 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var reqPassportDocument = function(req, res, next) {
  if (!req.params.type || !req.params.id) {
    return next();
  }

Severity: Major
Found in app/routers/auths.js - About 4 hrs to fix

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

    var authsRouter = function(app) {
      app.get('/:type/:id/auth', reqPassportDocument, function(req, res, next) {
        if (!req.document) {
          return res.sendStatus(404);
        }
    Severity: Minor
    Found in app/routers/auths.js - About 1 hr to fix

      Definition for rule 'padding-line-between-statements' was not found
      Open

      var _ = require('lodash'),
      Severity: Minor
      Found in app/routers/auths.js by eslint

      For more information visit Source: http://eslint.org/docs/rules/

      There are no issues that match your filters.

      Category
      Status