timi-codes/Banka

View on GitHub
API/services/account.service.js

Summary

Maintainability
A
0 mins
Test Coverage

Showing 0 of 1 total issue

Function createAccount has a Cognitive Complexity of 10 (exceeds 6 allowed). Consider refactoring.
Invalid

static async createAccount(userId, type, balance) {
try {
const user = await User.findUserById(userId); // check if user already exist
 
if (user) {
Severity: Minor
Found in API/services/account.service.js - About 55 mins to fix

There are no issues that match your filters.

Category
Status