icynet-auth-server/src/modules/objects/upload/upload.providers.ts

12 lines
327 B
TypeScript
Raw Normal View History

import { Provider } from '@nestjs/common';
2022-08-18 07:12:02 +00:00
import { DataSource } from 'typeorm';
2022-03-09 18:37:04 +00:00
import { Upload } from './upload.entity';
export const uploadProviders: Provider<any>[] = [
2022-03-09 18:37:04 +00:00
{
provide: 'UPLOAD_REPOSITORY',
2022-08-18 07:12:02 +00:00
useFactory: (dataSource: DataSource) => dataSource.getRepository(Upload),
inject: ['DATA_SOURCE'],
2022-03-09 18:37:04 +00:00
},
];