superdesk/superdesk-client-core

View on GitHub
scripts/extensions/sams/src/api/workspace.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function updateSetsAllowedDesks has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function updateSetsAllowedDesks(setId: ISetItem['_id'], allowedDesks: Array<IDesk['_id']>): Promise<void> {
    const store = getStoreSync();
    const currentlyAllowed: Array<IDesk['_id']> = getDesksAllowedSets(store.getState())[setId] ?? [];
    const toRemove = currentlyAllowed.filter(
        (deskId) => !allowedDesks.includes(deskId),
Severity: Minor
Found in scripts/extensions/sams/src/api/workspace.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status