mongaku/mongaku

View on GitHub
src/logic/sitemaps.js

Summary

Maintainability
B
6 hrs
Test Coverage

Function exports has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(app) {
    return {
        index({lang}, res) {
            const sitemaps = [];

Severity: Major
Found in src/logic/sitemaps.js - About 3 hrs to fix

    Function index has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            index({lang}, res) {
                const sitemaps = [];
    
                async.each(
                    Object.keys(options.types),
    Severity: Minor
    Found in src/logic/sitemaps.js - About 1 hr to fix

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

              search({params, lang}, res) {
                  // Query for the records in Elasticsearch
                  const Record = record(params.type);
                  Record.search(
                      {
      Severity: Minor
      Found in src/logic/sitemaps.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status