Files
TREK/server/src/nest/unsplash/unsplash.module.ts
T
Maurice 724c88c201 style: format server and shared with prettier
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.
2026-10-10 21:23:37 +02:00

24 lines
1.3 KiB
TypeScript

import { AppSettings } from '../../db/entities/AppSettings.entity';
import { Users } from '../../db/entities/Users.entity';
import { AppConfigModule } from '../app-config/app-config.module';
import { StorageModule } from '../storage/storage.module';
import { UnsplashService } from './unsplash.service';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { Module } from '@nestjs/common';
/** Unsplash cover search and download. No controller of its own — trips and
* places both reach it. Deliberately NOT @Global, matching PermissionsModule:
* e2e TestingModules resolve it through each consumer's explicit import.
* AppConfigModule is imported explicitly because @Global only applies to
* modules that are in the graph, which a single-domain TestingModule is not.
* MikroOrmModule.forFeature registers AppSettingsRepository/UsersRepository
* for UnsplashService's @InjectRepository constructor params (Plan 3a Task
* 5): getUnsplashKey passes them straight into instance-api-keys.ts's
* resolveApiKey, which no longer reads a raw connection at all. */
@Module({
imports: [AppConfigModule, StorageModule, MikroOrmModule.forFeature([AppSettings, Users])],
providers: [UnsplashService],
exports: [UnsplashService],
})
export class UnsplashModule {}