tieme-ndo/backend

View on GitHub
controllers/changeRequest/getChangeRequests.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function getChangeRequestById has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getChangeRequestById = async (req, res, next) => {
  try {
    const changeRequest = await models.ChangeRequest.findOne({
      _id: req.params.id
    }).lean();
Severity: Minor
Found in controllers/changeRequest/getChangeRequests.js - About 1 hr to fix

    Function getAllChangeRequests has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const getAllChangeRequests = async (req, res, next) => {
      try {
        const nonRequestedDataFields = {
          requested_changes: false
        };
    Severity: Minor
    Found in controllers/changeRequest/getChangeRequests.js - About 1 hr to fix

      Parsing error: Invalid ecmaVersion.
      Open

      /* eslint-disable camelcase */

      For more information visit Source: http://eslint.org/docs/rules/

      There are no issues that match your filters.

      Category
      Status