Skip to content

P1B: Refactor (src/controllers/helpers.js): Function with high complexity (count = 14): notAllowed #175

@ssura1

Description

@ssura1

Uniqueness check

  • I have searched open issues and confirmed this file + smell is not already taken.

Full path to the JavaScript file

src/controllers/helpers.js

Function(s)/scope targeted

helpers.notAllowed

Relevant Qlty output

Function with high complexity (count = 14): notAllowed

         125  helpers.notAllowed = async function (req, res, error) {
         126    ({ error } = await plugins.hooks.fire('filter:helpers.notAllowed', { req, res, error }));
         127  
         128    await plugins.hooks.fire('response:helpers.notAllowed', { req, res, error });
         129    if (res.headersSent) {
         130            return;
              [hid 33 additional lines]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions