chore(twenty-server): remove eslint warn + add maxWarning 0 (#10103)

This commit is contained in:
Antoine Moreaux
2025-02-11 10:38:43 +01:00
committed by GitHub
parent 59af303b4c
commit de91a5e39e
17 changed files with 57 additions and 34 deletions

View File

@ -7,6 +7,7 @@ import {
import { Request } from 'express';
import { jwtDecode } from 'jwt-decode';
import { isDefined } from 'twenty-shared';
import { JwtPayload } from 'src/engine/core-modules/auth/types/auth-context.type';
@ -24,8 +25,10 @@ export class AggregateByWorkspaceContextIdStrategy
return () => contextId;
}
if (workspaces.has(jwtPayload.workspaceId)) {
workspaceSubTreeId = workspaces.get(jwtPayload.workspaceId)!;
const subTreeId = workspaces.get(jwtPayload.workspaceId);
if (isDefined(subTreeId)) {
workspaceSubTreeId = subTreeId;
} else {
workspaceSubTreeId = ContextIdFactory.create();
workspaces.set(jwtPayload.workspaceId, workspaceSubTreeId);