[core] Add WHATSAPP_SWAGGER_ENABLED environment variable

This commit is contained in:
allburov committed 2023-11-25 20:33:35 +07:00
1 parent 4a807530c1
commit fdbaa43ec9
1 file changed
+5
+5
View File
@@ -127,6 +127,11 @@ export class WhatsappConfigService {
return this.configService.get('WHATSAPP_API_KEY', '');
}
getSwaggerEnabled(): boolean {
const value = this.configService.get('WHATSAPP_SWAGGER_ENABLED', 'true');
return parseBool(value);
}
getSwaggerUsernamePassword(): [string, string] | undefined {
const user = this.configService.get('WHATSAPP_SWAGGER_USERNAME', undefined);
const password = this.configService.get(