tolulope-od/banka

View on GitHub
server/dummyControllers/TransactionController.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function debitAccount has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  static debitAccount(req, res) {
    const { accountNumber } = req.params;
    const { debitAmount } = req.body;
    if (req.decoded.type !== 'staff') {
      return res.status(401).json({
Severity: Major
Found in server/dummyControllers/TransactionController.js - About 2 hrs to fix

    Function creditAccount has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static creditAccount(req, res) {
        const { accountNumber } = req.params;
        const { creditAmount } = req.body;
        if (req.decoded.type !== 'staff') {
          return res.status(401).json({
    Severity: Major
    Found in server/dummyControllers/TransactionController.js - About 2 hrs to fix

      There are no issues that match your filters.

      Category
      Status