Browse Source

FIX | Sms module

merge-requests/236/head
Vitalik 2 years ago
parent
commit
d10d0435b0
  1. 34
      src/domain/sms/sms.module.ts

34
src/domain/sms/sms.module.ts

@ -20,13 +20,12 @@ export class SmsModule { @@ -20,13 +20,12 @@ export class SmsModule {
return {
module: SmsModule,
imports: [
HttpModule.register({
timeout: 5000,
maxRedirects: 3,
baseURL: 'https://alphasms.ua/api/http.php',
}),
],
}
}
static forFeature(): DynamicModule {
return {
module: SmsModule,
providers: [
provideClass(
SMS_SERVICE,
@ -41,28 +40,11 @@ export class SmsModule { @@ -41,28 +40,11 @@ export class SmsModule {
useValue: SmsModule.options.alphasmsFrom,
},
],
}
}
static forFeature(): DynamicModule {
console.log('SmsModule.options.test', SmsModule.options.test)
return {
module: SmsModule,
providers: [
provideClass(SMS_SERVICE, true ? TelegramSmsService : AlphaSmsService),
// {
// provide: ALPHASMS_API_KEY,
// useValue: SmsModule.options.alphasmsApiKey,
// },
// {
// provide: ALPHASMS_FROM,
// useValue: SmsModule.options.alphasmsFrom,
// },
],
imports: [
HttpModule.register({
timeout: 36000,
timeout: 5000,
maxRedirects: 3,
baseURL: 'https://alphasms.ua/api/http.php',
}),
],
exports: SmsModule.getExports(),

Loading…
Cancel
Save