philippebeck/nens

View on GitHub
controller/ImageCtrl.js

Summary

Maintainability
A
2 hrs
Test Coverage

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

exports.updateImage = async (req, res, next) => {
  const { IMAGE_NOT_UPDATED, IMAGE_UPDATED } = process.env;
  const ID = parseInt(req.params.id, 10);

  form.parse(req, async (err, fields, files) => {
Severity: Minor
Found in controller/ImageCtrl.js - About 1 hr to fix

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

    exports.createImage = async (req, res, next) => {
      const { GALLERY_NOT_FOUND, IMAGE_CREATED, IMAGE_NOT_CREATED, IMG_EXT } = process.env;
    
      form.parse(req, async (err, fields, files) => {
        if (err) { next(err); return }
    Severity: Minor
    Found in controller/ImageCtrl.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status