540co/ads-bpa

View on GitHub
server/models/service-manager.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function getDefinitionsFromDictionaryApi has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

serviceManager.getDefinitionsFromDictionaryApi = function (term, api_key, callback) {

    // TODO: Further investigate ability to use HTTPS in calls to API
    var url = "http://www.dictionaryapi.com/api/v1/references/medical/xml/" + encodeURIComponent(term.toLowerCase()) + "?key=" + api_key;

Severity: Major
Found in server/models/service-manager.js - About 2 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                      if (Array.isArray(v.def[0].sensb[0].sens)) {
    
                          _.forEach(v.def[0].sensb, function (v,k) {
    
                            if (v.sens[0].dt[0]['_']) {
    Severity: Major
    Found in server/models/service-manager.js - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status