RocketChat/Rocket.Chat

View on GitHub
apps/meteor/server/lib/statistics/getSettingsStatistics.ts

Summary

Maintainability
B
5 hrs
Test Coverage

Function setSettingsStatistics has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const setSettingsStatistics = async (settings: ISettingStatistics): Promise<ISettingStatisticsObject> => {
    const {
        account2fa,
        cannedResponsesEnabled,
        e2e,
Severity: Major
Found in apps/meteor/server/lib/statistics/getSettingsStatistics.ts - About 3 hrs to fix

    Function getSettingsStatistics has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getSettingsStatistics = async (): Promise<ISettingStatisticsObject> => {
        try {
            const settingsBase = [
                { key: 'Accounts_TwoFactorAuthentication_Enabled', alias: 'account2fa' },
                { key: 'E2E_Enable', alias: 'e2e' },
    Severity: Minor
    Found in apps/meteor/server/lib/statistics/getSettingsStatistics.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status