casefoundation/weekly-roundup

View on GitHub
server/lib/models/Roundup.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function UpdateDiffRecipients has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  UpdateDiffRecipients: function (transacting, roundup, to = [], cc = []) {
    const promises = [];
    const toHash = {};
    const ccHash = {};
    const roundupToHash = {};
Severity: Minor
Found in server/lib/models/Roundup.js - About 1 hr to fix

    Function Create has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Create: function (user_id) {
        return bookshelf.transaction((t) => {
          // Find User's most recent roundup
          return Roundup.ByUserId(user_id)
            .then((results) => {          
    Severity: Minor
    Found in server/lib/models/Roundup.js - About 1 hr to fix

      Function Update has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        Update: function (user_id, roundup_id, subject, to, cc, preface) {
      Severity: Minor
      Found in server/lib/models/Roundup.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status