feat: added query to see is smtp enabled or not
This commit is contained in:
@@ -292,6 +292,14 @@ export class InfraResolver {
|
|||||||
return this.infraConfigService.getAllowedAuthProviders();
|
return this.infraConfigService.getAllowedAuthProviders();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Query(() => Boolean, {
|
||||||
|
description: 'Check if the SMTP is enabled or not',
|
||||||
|
})
|
||||||
|
@UseGuards(GqlAuthGuard)
|
||||||
|
isSMTPEnabled() {
|
||||||
|
return this.infraConfigService.isSMTPEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
/* Mutations */
|
/* Mutations */
|
||||||
|
|
||||||
@Mutation(() => [InfraConfig], {
|
@Mutation(() => [InfraConfig], {
|
||||||
|
|||||||
@@ -316,6 +316,16 @@ export class InfraConfigService implements OnModuleInit {
|
|||||||
.split(',');
|
.split(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if SMTP is enabled or not
|
||||||
|
* @returns boolean
|
||||||
|
*/
|
||||||
|
isSMTPEnabled() {
|
||||||
|
return (
|
||||||
|
this.configService.get<string>('INFRA.MAILER_SMTP_ENABLE') === 'true'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset all the InfraConfigs to their default values (from .env)
|
* Reset all the InfraConfigs to their default values (from .env)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user