mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Fix/smtp creds env (#12611)
* submodule update commit * fix: updated smtp env creds * fix: updated smtp route, added base flag * feat: added smtp util service * fix: removed instanceSettings module
This commit is contained in:
parent
98f6b9e114
commit
14c47e60df
6 changed files with 21 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit df736e11aa0246e704ec7433cc2025d10fdad0f3
|
||||
Subproject commit 9aa23fc0aa78a84dd13dd7308fa3de63c9c553ff
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit e62dbb822ddbe86e35f2405edbf830711632cf7b
|
||||
Subproject commit 9099be6814072b4e37713af6f374868b027c95f8
|
||||
|
|
@ -57,5 +57,6 @@ export function getDefaultInstanceSettings() {
|
|||
[INSTANCE_SYSTEM_SETTINGS.SMTP_PASSWORD]: process.env.SMTP_PASSWORD,
|
||||
[INSTANCE_SYSTEM_SETTINGS.SMTP_ENABLED]: process.env.SMTP_DISABLED === 'true' ? 'false' : 'true',
|
||||
[INSTANCE_SYSTEM_SETTINGS.SMTP_ENV_CONFIGURED]: 'true',
|
||||
[INSTANCE_SYSTEM_SETTINGS.SMTP_FROM_EMAIL]: process.env.DEFAULT_FROM_EMAIL
|
||||
};
|
||||
}
|
||||
|
|
|
|||
7
server/src/modules/smtp/interfaces/IUtilService.ts
Normal file
7
server/src/modules/smtp/interfaces/IUtilService.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export interface ISMTPUtilService {
|
||||
getSmtpEnv(
|
||||
key?: string | string[],
|
||||
getAllData?: boolean,
|
||||
type?: any
|
||||
): Promise<any>;
|
||||
}
|
||||
|
|
@ -9,11 +9,12 @@ export class SMTPModule {
|
|||
const importPath = await getImportPath(configs?.IS_GET_CONTEXT);
|
||||
const { SMTPService } = await import(`${importPath}/smtp/service`);
|
||||
const { SmtpController } = await import(`${importPath}/smtp/controller`);
|
||||
const { SMTPUtilService } = await import(`${importPath}/smtp/util.service`)
|
||||
return {
|
||||
module: SMTPModule,
|
||||
imports: [await InstanceSettingsModule.register(configs)],
|
||||
controllers: [SmtpController],
|
||||
providers: [SMTPService, FeatureAbilityFactory],
|
||||
providers: [SMTPService, FeatureAbilityFactory, SMTPUtilService],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
9
server/src/modules/smtp/util.service.ts
Normal file
9
server/src/modules/smtp/util.service.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Injectable } from "@nestjs/common";
|
||||
import { ISMTPUtilService } from "./interfaces/IUtilService";
|
||||
|
||||
@Injectable()
|
||||
export class SMTPUtilService implements ISMTPUtilService {
|
||||
getSmtpEnv(key?: string | string[], getAllData = false, type?: any): Promise<any> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue