Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

chore(server): lint:boundaries holds the user-connection repositories and the journey read at their new count

Mauricea28044dbd421
diff --git a/server/scripts/import-boundaries-baseline.json b/server/scripts/import-boundaries-baseline.json
index 1bf5c692c..07740cb1d 100644
--- a/server/scripts/import-boundaries-baseline.json
+++ b/server/scripts/import-boundaries-baseline.json
@@ -196,7 +196,6 @@
"integrations -> Users (owned by auth)",
"journey -> Places (owned by places)",
"journey -> Trips (owned by trips)",
- "journey -> Users (owned by auth)",
"llm-parse -> Addons (owned by addons)",
"maps -> AppSettings (owned by settings)",
"maps -> Places (owned by places)",
diff --git a/server/src/nest/database/user-connection-repositories.module.ts b/server/src/nest/database/user-connection-repositories.module.ts
index 0ea461132..d2d280586 100644
--- a/server/src/nest/database/user-connection-repositories.module.ts
+++ b/server/src/nest/database/user-connection-repositories.module.ts
@@ -1,22 +1,34 @@
-import { Module } from '@nestjs/common';
-import { EntityManager } from '@mikro-orm/core';
import { UserAirtrailRepository } from '../../db/repositories/UserAirtrail.repository';
import { UserImmichRepository } from '../../db/repositories/UserImmich.repository';
import { UserSynologyRepository } from '../../db/repositories/UserSynology.repository';
+import { EntityManager } from '@mikro-orm/core';
+import { Module } from '@nestjs/common';
/**
* Provides the repositories for the third-party connections a user keeps on
* their own `users` row (Immich, Synology Photos, AirTrail). They share the
* `users` table with `UsersRepository`, so MikroORM's one-repository-per-entity
- * `@InjectRepository(Users)` cannot hand them out; each is a factory over the
+ * injection for the `Users` entity cannot hand them out; each is a factory over the
* context-resolving global `EntityManager`, as `MaintenanceModule` does, so it
* resolves the request or transaction fork active when a method runs.
*/
@Module({
providers: [
- { provide: UserImmichRepository, useFactory: (em: EntityManager) => new UserImmichRepository(em), inject: [EntityManager] },
- { provide: UserSynologyRepository, useFactory: (em: EntityManager) => new UserSynologyRepository(em), inject: [EntityManager] },
- { provide: UserAirtrailRepository, useFactory: (em: EntityManager) => new UserAirtrailRepository(em), inject: [EntityManager] },
+ {
+ provide: UserImmichRepository,
+ useFactory: (em: EntityManager) => new UserImmichRepository(em),
+ inject: [EntityManager],
+ },
+ {
+ provide: UserSynologyRepository,
+ useFactory: (em: EntityManager) => new UserSynologyRepository(em),
+ inject: [EntityManager],
+ },
+ {
+ provide: UserAirtrailRepository,
+ useFactory: (em: EntityManager) => new UserAirtrailRepository(em),
+ inject: [EntityManager],
+ },
],
exports: [UserImmichRepository, UserSynologyRepository, UserAirtrailRepository],
})