engagementgamelab/CivicSeed

View on GitHub
server/utils/database-actions.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function resetDefaultData has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  resetDefaultData: function (model, callback) {
    var collectionName = model.collection.collection.collectionName

    winston.info('CS: '.blue + 'Resetting default data for collection: '.magenta + collectionName.yellow.underline + ' ...'.magenta)

Severity: Minor
Found in server/utils/database-actions.js - About 1 hr to fix

    Avoid deeply nested control flow statements.
    Open

                    if (err) {
                      callback(err)
                    } else {
                      callback()
                    }
    Severity: Major
    Found in server/utils/database-actions.js - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status