src/accounts/controllers/index.ts
Function deleteAccount
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public deleteAccount(accountType: string, index: number): void {
// Check if the account can be deleted
this.accountModel
.find(Number(this.accounts[accountType].accounts[index].id))
.then((account: Account): void => {
Function editAccount
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public editAccount(accountType?: string, index?: number): void {
// Helper function to sort by account name
function byName(a: Account, b: Account): number {
return a.name.localeCompare(b.name);
}