tolulope-od/banka

View on GitHub
server/dummyControllers/AccountController.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function createAccount has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  static createAccount(req, res) {
    const { type } = req.body;
    const { id, firstName, lastName, email } = req.decoded;
    if (req.decoded.type === 'client') {
      const newAccount = new Account();
Severity: Minor
Found in server/dummyControllers/AccountController.js - About 1 hr to fix

    Function editAccountStatus has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static editAccountStatus(req, res) {
        const { accountNumber } = req.params;
        const { status } = req.body;
        if (req.decoded.type !== 'staff') {
          return res.status(401).json({
    Severity: Minor
    Found in server/dummyControllers/AccountController.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status