mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 11:06:06 +00:00
724c88c201
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
45 lines
2.1 KiB
TypeScript
45 lines
2.1 KiB
TypeScript
import { PluginGuardsModule } from '../../nest-rpc/plugin-guards.module';
|
|
import { McpSharedModule } from '../mcp-shared/mcp-shared.module';
|
|
import { PermissionsModule } from '../permissions/permissions.module';
|
|
import { PlacesModule } from '../places/places.module';
|
|
import { RealtimeModule } from '../realtime/realtime.module';
|
|
import { AccommodationsDomainModule } from './accommodations-domain.module';
|
|
import { AccommodationsController } from './accommodations.controller';
|
|
import { AccommodationsMcp } from './accommodations.mcp';
|
|
import { AccommodationsRpc } from './accommodations.rpc';
|
|
import { Module } from '@nestjs/common';
|
|
|
|
/**
|
|
* Accommodations. One fachlichkeit, one module: the routes used to sit in
|
|
* reservations/ while the SQL sat on DaysService, so neither module owned the
|
|
* thing outright and every call crossed a domain boundary to reach its own data.
|
|
*
|
|
* It imports neither days nor reservations. The stay rows reference days by id,
|
|
* which is a foreign key, not a module edge. PlacesModule is here only because
|
|
* create_place_accommodation writes a place and a stay in one transaction --
|
|
* the same reason DaysMcp could drop it.
|
|
*
|
|
* AssignmentsDomainModule is the service half only, the same leaf PlacesModule
|
|
* already imports, so the day stop a booking implies is written through
|
|
* AssignmentsService instead of a second copy of its SQL. No edge back: that
|
|
* module reaches permissions, query helpers, journey and realtime, none of
|
|
* which comes near accommodations.
|
|
*/
|
|
@Module({
|
|
imports: [
|
|
McpSharedModule,
|
|
PermissionsModule,
|
|
RealtimeModule,
|
|
PluginGuardsModule,
|
|
PlacesModule,
|
|
AccommodationsDomainModule,
|
|
],
|
|
controllers: [AccommodationsController],
|
|
providers: [AccommodationsRpc, AccommodationsMcp],
|
|
// The MODULE, not the provider: Nest refuses to export a provider that belongs to
|
|
// an imported module, and the service lives in the domain module now. Re-exporting
|
|
// the module gives every existing importer the same service it always got.
|
|
exports: [AccommodationsDomainModule],
|
|
})
|
|
export class AccommodationsModule {}
|