punchcard-cms/punchcard

View on GitHub
lib/api/apis.js

Summary

Maintainability
A
3 hrs
Test Coverage

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

const all = (query, models, next) => {
  const organize = utils.organize(query);
  const mods = _.cloneDeep(models) || [];

  return database.transaction(trx => {
Severity: Minor
Found in lib/api/apis.js - About 1 hr to fix

Function ofType has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ofType = (query, model, models) => {
  const organize = utils.organize(query);
  const mods = _.cloneDeep(models) || [];
  let attrs = [];

Severity: Minor
Found in lib/api/apis.js - About 1 hr to fix

Function types has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const types = app => {
  let cts = _.cloneDeep(app.get('content-types')).map(ct => {
    const type = {};

    Object.keys(ct).forEach(attr => {
Severity: Minor
Found in lib/api/apis.js - About 1 hr to fix

There are no issues that match your filters.

Category
Status