mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-27 19:15:12 +02:00
14 lines
366 B
TypeScript
14 lines
366 B
TypeScript
import { DataSource } from 'typeorm';
|
|
import { DATA_SOURCE } from '../database/database.providers';
|
|
import { User } from './user.entity';
|
|
|
|
export const USER_REPOSITORY = 'USER_REPOSITORY';
|
|
|
|
export const userProviders = [
|
|
{
|
|
provide: USER_REPOSITORY,
|
|
useFactory: (dataSource: DataSource) => dataSource.getRepository(User),
|
|
inject: [DATA_SOURCE],
|
|
},
|
|
];
|