mirror of
https://github.com/immich-app/immich.git
synced 2025-01-10 13:56:47 +01:00
6c7679714b
* refactor: jobs and processors * refactor: storage migration processor * fix: tests * fix: code warning * chore: ignore coverage from infra * fix: sync move asset logic between job core and asset core * refactor: move error handling inside of catch * refactor(server): job core into dedicated service calls * refactor: smart info * fix: tests * chore: smart info tests * refactor: use asset repository * refactor: thumbnail processor * chore: coverage reqs
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import { DynamicModule, Global, Module, ModuleMetadata, Provider } from '@nestjs/common';
|
|
import { APIKeyService } from './api-key';
|
|
import { AssetService } from './asset';
|
|
import { AuthService } from './auth';
|
|
import { DeviceInfoService } from './device-info';
|
|
import { MediaService } from './media';
|
|
import { OAuthService } from './oauth';
|
|
import { ShareService } from './share';
|
|
import { SmartInfoService } from './smart-info';
|
|
import { StorageService } from './storage';
|
|
import { StorageTemplateService } from './storage-template';
|
|
import { INITIAL_SYSTEM_CONFIG, SystemConfigService } from './system-config';
|
|
import { UserService } from './user';
|
|
|
|
const providers: Provider[] = [
|
|
AssetService,
|
|
APIKeyService,
|
|
AuthService,
|
|
DeviceInfoService,
|
|
MediaService,
|
|
OAuthService,
|
|
SmartInfoService,
|
|
StorageService,
|
|
StorageTemplateService,
|
|
SystemConfigService,
|
|
UserService,
|
|
ShareService,
|
|
{
|
|
provide: INITIAL_SYSTEM_CONFIG,
|
|
inject: [SystemConfigService],
|
|
useFactory: async (configService: SystemConfigService) => {
|
|
return configService.getConfig();
|
|
},
|
|
},
|
|
];
|
|
|
|
@Global()
|
|
@Module({})
|
|
export class DomainModule {
|
|
static register(options: Pick<ModuleMetadata, 'imports'>): DynamicModule {
|
|
return {
|
|
module: DomainModule,
|
|
imports: options.imports,
|
|
providers: [...providers],
|
|
exports: [...providers],
|
|
};
|
|
}
|
|
}
|