mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-15 04:59:42 +03:00
Create modules,providers, services for bd
This commit is contained in:
11
backend/src/db_providers/admin.providers.ts
Normal file
11
backend/src/db_providers/admin.providers.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { DataSource } from 'typeorm';
|
||||
import { Admin } from '../db.entity';
|
||||
import { adminRep, dataSource } from '../constants';
|
||||
|
||||
export const adminProviders = [
|
||||
{
|
||||
provide: adminRep,
|
||||
useFactory: (dataSource: DataSource) => dataSource.getRepository(Admin),
|
||||
inject: [dataSource],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user