leksyib/iReporter

View on GitHub
server/controllers/adminController.js

Summary

Maintainability
A
1 hr
Test Coverage

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

  static async changeRecordStatus(req, res) {
    const errors = validationResult(req).array().map(error => error.msg);
    if (errors.length < 1) {
      const record = await Records.findOneById(req.params.id);
      if (record.rowCount === 1) {
Severity: Minor
Found in server/controllers/adminController.js - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status