mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-24 23:14:39 +03:00
fix: forRoot method working
This commit is contained in:
parent
25710b7908
commit
ee0ad03af8
@ -19,10 +19,18 @@ import { TelegrafProvider } from './telegraf.provider';
|
||||
})
|
||||
export class TelegrafCoreModule {
|
||||
public static forRoot(options: TelegrafModuleOptions): DynamicModule {
|
||||
const telegrafProvider = {
|
||||
provide: TELEGRAF_PROVIDER,
|
||||
useClass: TelegrafProvider,
|
||||
inject: [TELEGRAF_MODULE_OPTIONS],
|
||||
};
|
||||
return {
|
||||
module: TelegrafCoreModule,
|
||||
providers: [],
|
||||
exports: [],
|
||||
providers: [
|
||||
{ provide: TELEGRAF_MODULE_OPTIONS, useValue: options },
|
||||
telegrafProvider,
|
||||
],
|
||||
exports: [telegrafProvider],
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user