12 lines
295 B
TypeScript
12 lines
295 B
TypeScript
|
import { Connection } from 'typeorm';
|
||
|
import { OAuth2Token } from './oauth2-token.entity';
|
||
|
|
||
|
export const tokenProviders = [
|
||
|
{
|
||
|
provide: 'TOKEN_REPOSITORY',
|
||
|
useFactory: (connection: Connection) =>
|
||
|
connection.getRepository(OAuth2Token),
|
||
|
inject: ['DATABASE_CONNECTION'],
|
||
|
},
|
||
|
];
|