mirror of
https://github.com/immich-app/immich.git
synced 2025-01-10 05:46:46 +01:00
23 lines
570 B
TypeScript
23 lines
570 B
TypeScript
|
import { databaseConfig, UserEntity } from '@app/infra';
|
||
|
import { IUserRepository } from '@app/domain';
|
||
|
import { Global, Module, Provider } from '@nestjs/common';
|
||
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||
|
import { UserRepository } from './db';
|
||
|
|
||
|
const providers: Provider[] = [
|
||
|
//
|
||
|
{ provide: IUserRepository, useClass: UserRepository },
|
||
|
];
|
||
|
|
||
|
@Global()
|
||
|
@Module({
|
||
|
imports: [
|
||
|
//
|
||
|
TypeOrmModule.forRoot(databaseConfig),
|
||
|
TypeOrmModule.forFeature([UserEntity]),
|
||
|
],
|
||
|
providers: [...providers],
|
||
|
exports: [...providers],
|
||
|
})
|
||
|
export class InfraModule {}
|