scripts/extensions/sams/src/api/workspace.ts
Function updateSetsAllowedDesks
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
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),