linagora/openpaas-esn

View on GitHub
backend/core/user/search.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function _search has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function _search(options, callback) {
  options.limit = +options.limit || CONSTANTS.USERS_SEARCH_DEFAULT_LIMIT;
  options.offset = +options.offset || CONSTANTS.USERS_SEARCH_DEFAULT_OFFSET;

  if (!options.search) {
Severity: Minor
Found in backend/core/user/search.js - About 1 hr to fix

    Function _getElasticsearchMustNotQuery has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function _getElasticsearchMustNotQuery(options) {
      const result = {
        bool: {
          should: [{
            terms: {
    Severity: Minor
    Found in backend/core/user/search.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status