Simplify ORM (#6373)

This PR refactors the ORM-Manager to simplify and unify the datasource
creation. I'm deprecating all usages if InjectWorkspaceDatasource and
InjectWorkspaceRepository as we can't be sure they are up-to-date
This commit is contained in:
Charles Bochet
2024-07-23 14:13:16 +02:00
committed by GitHub
parent 794e73eeb6
commit 6c34ef9a14
23 changed files with 205 additions and 1672 deletions

View File

@ -44,9 +44,10 @@ export class BlocklistReimportCalendarEventsJob {
return;
}
const calendarChannelRepository = await this.twentyORMManager.getRepository(
CalendarChannelWorkspaceEntity,
);
const calendarChannelRepository =
await this.twentyORMManager.getRepository<CalendarChannelWorkspaceEntity>(
'calendarChannel',
);
await calendarChannelRepository.update(
{