mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-10 19:26:02 +00:00
* refactor(server): shared links * chore: tests * fix: bugs and tests * fix: missed one expired at * fix: standardize file upload checks * test: lower flutter version Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
38 lines
975 B
TypeScript
38 lines
975 B
TypeScript
import { DynamicModule, Global, Module, ModuleMetadata, Provider } from '@nestjs/common';
|
|
import { APIKeyService } from './api-key';
|
|
import { ShareService } from './share';
|
|
import { AuthService } from './auth';
|
|
import { OAuthService } from './oauth';
|
|
import { INITIAL_SYSTEM_CONFIG, SystemConfigService } from './system-config';
|
|
import { UserService } from './user';
|
|
|
|
const providers: Provider[] = [
|
|
APIKeyService,
|
|
AuthService,
|
|
OAuthService,
|
|
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],
|
|
};
|
|
}
|
|
}
|