mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-24 23:14:39 +03:00
refactor(services): rename module services
This commit is contained in:
parent
b67b859810
commit
ec99dcd65f
@ -1 +1 @@
|
||||
export * from './invalid-configuration.exeption';
|
||||
export * from './invalid-configuration.exeption'
|
||||
|
@ -1,5 +1,5 @@
|
||||
export * from './telegraf.module'
|
||||
export * from './interfaces'
|
||||
export * from './decorators'
|
||||
export * from './telegraf-bot.service'
|
||||
export * from './telegraf-telegram-client.service'
|
||||
export * from './telegraf.service'
|
||||
export * from './telegraf-telegram.service'
|
||||
|
@ -5,7 +5,7 @@ import { TokenInjectionToken } from './telegraf.constants'
|
||||
import { TelegrafOptionsFactory } from './interfaces'
|
||||
|
||||
@Injectable()
|
||||
export class TelegrafTelegramClientService {
|
||||
export class TelegrafTelegramService {
|
||||
private telegram: any
|
||||
|
||||
public constructor(
|
@ -1,11 +1,7 @@
|
||||
import { Module, DynamicModule, Provider } from '@nestjs/common'
|
||||
import { TelegrafBotService } from './telegraf-bot.service'
|
||||
import {
|
||||
TelegrafModuleAsyncOptions,
|
||||
TelegrafOptionsFactory,
|
||||
} from './interfaces'
|
||||
import { TelegrafModuleAsyncOptions, TelegrafOptionsFactory } from './interfaces'
|
||||
import { TELEGRAF_MODULE_OPTIONS, TokenInjectionToken } from './telegraf.constants'
|
||||
import { TelegrafTelegramClientService } from './telegraf-telegram-client.service'
|
||||
import { TelegrafService, TelegrafTelegramService } from './'
|
||||
|
||||
@Module({})
|
||||
export class TelegrafModule {
|
||||
@ -15,14 +11,14 @@ export class TelegrafModule {
|
||||
imports: options.imports || [],
|
||||
providers: [
|
||||
...this.createAsyncProviders(options),
|
||||
TelegrafBotService,
|
||||
TelegrafTelegramClientService,
|
||||
TelegrafService,
|
||||
TelegrafTelegramService,
|
||||
{
|
||||
provide: TokenInjectionToken,
|
||||
useClass: options.useClass,
|
||||
},
|
||||
],
|
||||
exports: [TelegrafBotService, TelegrafTelegramClientService],
|
||||
exports: [TelegrafService, TelegrafTelegramService],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,8 @@ import {
|
||||
import { InvalidConfigurationException } from './exeptions'
|
||||
|
||||
@Injectable()
|
||||
export class TelegrafBotService {
|
||||
private readonly logger = new Logger(TelegrafBotService.name, true)
|
||||
export class TelegrafService {
|
||||
private readonly logger = new Logger(TelegrafService.name, true)
|
||||
private readonly sitePublicUrl?: string
|
||||
private readonly bot: Telegraf<ContextMessageUpdate>
|
||||
private ref: ModuleRef
|
Loading…
Reference in New Issue
Block a user